Commit Graph

30 Commits

Author SHA1 Message Date
Jarek Radosz b0702337df
DEV: Fix rake qunit logging (#16159)
It was logging just the first passed object, which resulted printing out empty lines instead of actual messages (e.g. deprecation warnings)
2022-03-10 20:43:17 +01:00
Robin Ward 3837eb45b8
FIX: Qunit tests were failing if your node was defaulting to IPV6 (#15773)
This is now the default in newer node versions. The code that fails is a
workaround for another error :'(

This also upgrades `chrome-launcher` which helpers with debugging.
2022-02-02 10:56:03 -05:00
Jarek Radosz df6e8b924e
DEV: Make legacy ember tests less likely to fail (#15147)
…on launch
2021-12-01 19:30:33 +01:00
David Taylor 4fa296c3ec
DEV: Print usedJSHeapSize to the console after QUnit run (#14462)
This is `console.log`'d to the browser console. run-qunit will print this to stdout. testem will not, so a custom reporter is implemented to print this message.

The `--enable-precise-memory-info` is added so that chrome provides high-resolution memory information. This API is not supported by firefox. The logic will degrade gracefully.
2021-09-28 16:32:56 +01:00
Osama Sayegh c47f55253f
DEV: Add optional theme test step to the `smoke:test` rake task (#13418)
The purpose of this is to allow us to catch regressions for a feature we've built recently that allows theme tests to run in production. We recently had a regression that we didn't notice for days, so to prevent that from happening again we'll use this in our internal CI pipelines.
2021-06-17 20:09:29 +03:00
Osama Sayegh 503017474c
DEV: Skip CSS watcher when running QUnit tests and expose more Chrome logs (#13390)
There are 2 changes in this PR:

1) Add a new environment variable called `DISCOURSE_SKIP_CSS_WATCHER` to disable our stylesheet watcher, and make the `qunit:test` rake task set this variable on the Unicorn/Rails server it spins up to disable our stylesheet watcher when running the tests because it doesn't really need it.

2) Print more Chrome logs (such as network/security errors) to the console.
2021-06-15 18:27:15 +03:00
Josh Soref 59097b207f
DEV: Correct typos and spelling mistakes (#12812)
Over the years we accrued many spelling mistakes in the code base. 

This PR attempts to fix spelling mistakes and typos in all areas of the code that are extremely safe to change 

- comments
- test descriptions
- other low risk areas
2021-05-21 11:43:47 +10:00
Robin Ward e429af8220
FIX: QUnit tests could time out based on load order (#12342)
By default our QUnit test runner starts automatically. This is normally
fine but for our `run-qunit.js` script we add a bunch of QUnit events
using `eval` and sometimes those events were added after the tests
already started/finished resulting in a hang.

This adds a new parameter that will cause QUnit not to run
automatically, which the runner uses, then triggers a `start()` when it
knows it's ready.
2021-03-10 13:32:20 -05:00
Joffrey JAFFEUX c6a1042950
DEV: prettier 2.2.1 (#11862) 2021-01-27 12:39:20 +01:00
Jarek Radosz ac5c457d9e
DEV: Move the failures list to the end of output (#11082)
No more scrolling up each time the tests fail.

(Alternatively, we could just not show the slowest tests list when there are any failures 🤷‍♂️)
2020-10-30 17:29:45 +01:00
Joffrey JAFFEUX f2a6791ce2
DEV: linting of run-qunit.js (#10728) 2020-09-23 12:52:11 +02:00
Penar Musaraj 78d443ad40
DEV: Add linebreaks around qunit "Tests timed out" message 2020-08-07 09:32:57 -04:00
Robin Ward 09254410ea FIX: Only raise proper `"error"` messages
Also support "1" for `QUNIT_FAIL_FAST` to make it consistent with other
arguments.
2020-08-05 16:27:06 -04:00
Robin Ward 0c8365a1a2 Improve output for QUnit tests in CI:
* Uses fewer lines of output
* Always outputs error at the end even if timeout
* Support for QUNIT_FAIL_FAST ENV var to quit at first failure
2020-08-05 13:43:14 -04:00
Robin Ward 18e3339580 Quit tests early, output seed to easily reproduce failure 2020-08-05 12:21:16 -04:00
Sam Saffron 8a50ab45aa
DEV: use REPORT_REQUESTS=1 to find all requests
We can use this to profile our pretender and ensure nothing is superfluous
and nothing is missing
2020-04-02 16:01:49 +11:00
David Taylor 8dcda65837 DEV: Correct error message check in run-qunit
Followup to 43ca1bb132
2019-12-12 14:06:06 +00:00
David Taylor 43ca1bb132 DEV: Handle occasional 'No inspectable targets' error in run-qunit
This is to work around https://github.com/GoogleChrome/chrome-launcher/issues/145
2019-12-12 13:24:58 +00:00
David Taylor 584021ca38 DEV: Correct error handling in run-qunit
runAllTests is an async function, so the try/catch block does not help. The function always returns a promise, so we need to use `.catch` to handle errors. Previously, raised errors were ignored, and the process continued running until it timed out.
2019-12-11 16:50:31 +00:00
Joffrey JAFFEUX b4d42d1151
DEV: removes memory profiling from qunit tests (#8120)
Most of the work on it has been done and it's un-necessary work for now.
2019-10-01 22:17:53 +02:00
Joffrey JAFFEUX 4aefe589de
DEV: rake qunit:test was crashing on macOS due to a flag (#8119)
flag: --disable-software-rasterizer
2019-10-01 20:40:48 +02:00
Joffrey JAFFEUX 460d431621
DEV: uses ember-cli recommended chrome flags (#7939) 2019-07-25 11:38:05 +02:00
Joffrey JAFFEUX cb08d3cc26
DEV: adds module debugging to js tests (#7751) 2019-06-11 23:14:42 +02:00
Joffrey JAFFEUX 43a46df075 Revert "DEV: no-sandbox flag is deprecated (#7660)"
This reverts commit d4d42bc61c.
2019-06-03 23:03:30 +02:00
Joffrey JAFFEUX d4d42bc61c
DEV: no-sandbox flag is deprecated (#7660) 2019-05-31 13:22:03 +02:00
Joffrey JAFFEUX 3e4e3fc7d7
DEV: adds memory/event listeners reporting (#7575) 2019-05-20 16:35:23 +02:00
Joffrey JAFFEUX f41aa5cb98
EXPERIMENTAL: attempts to gather info if chrome runner crashed (#7562) 2019-05-16 18:00:57 +02:00
Joffrey JAFFEUX ea214b2b0c
DEV: logs tests exception when running qunit on headless chrome (#7553) 2019-05-16 08:48:08 +02:00
Sam Saffron 5b36fadec9 DEV: correct qunit runner for autospec
Was no longer working on latest nodes, unlink expects a callback

Also cleans up eslint warnings.
2019-03-20 16:44:00 +11:00
David Taylor 404acef6e3 DEV: Move `run-qunit.js` out of the vendor directory 2018-12-03 16:16:37 +00:00