Commit Graph

10 Commits

Author SHA1 Message Date
4a1621c677 DEV: Use the Store to create User records (#23584) 2023-09-14 23:26:51 +02:00
4f12fd0339 DEV: Modernize model tests (#19104)
Uses `module()` instead of `discourseModule()`, native getters instead of `.get()`, fixes some assertions, uses the store instead of creating models directly
2022-11-18 20:36:32 +01:00
d162229758 DEV: Replace equal() with strictEqual() (#14827) 2021-11-08 10:26:28 +01:00
12b57c0dee FEATURE: Add "Recently read topics" tab to user activity page (#12047) 2021-02-11 22:36:50 +05:30
c6a1042950 DEV: prettier 2.2.1 (#11862) 2021-01-27 12:39:20 +01:00
bbe5d8d5cf DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
1b52cdedb1 DEV: Move more tests into modules (#11119)
Models, services, mixins, utilities, and most of the controllers
2020-11-05 20:23:28 +01:00
a17d54d0bf DEV: De-arrowify tests (#11068)
Using arrow functions changes `this` context, which is undesired in tests, e.g. it makes it impossible to setup things like pretender (`this.server`) in `beforeEach` hooks.

Ember guides always use classic functions in examples (e.g. https://guides.emberjs.com/release/testing/test-types/), and that's what it uses in its own test suite, as do various addons and ember apps.

It was also already used in Discourse where `this` was required. Moving forward, it will be needed in more places as we migrate toward ember-cli.

(I might later add a custom rule to eslint-discourse-ember to enforce this)
2020-10-30 17:37:32 +01:00
71d37953d5 REFACTOR: Import QUnit and related helpers rather than globals
We used many global functions to handle tests when they should be
imported like other libraries in our application. This also gets us
closer to the way Ember CLI prefers our tests to be laid out.
2020-10-07 11:50:49 -04:00
23f24bfb51 REFACTOR: Move javascript tests inside discourse app
This is where they should be as far as ember is concerned. Note this is
a huge commit and we should be really careful everything continues to
work properly.
2020-10-02 11:29:36 -04:00