Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/witty-apples-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"docs-app": patch
"test-app": patch
---

Converted testem config to TypeScript
4 changes: 2 additions & 2 deletions docs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@
"ember-resolver": "^13.2.0",
"ember-source": "~7.3.1",
"ember-svg-jar": "^3.0.0",
"ember-testem": "^0.5.1",
"embroider-css-modules": "^4.1.5",
"ember-testem": "^0.6.0",
"embroider-css-modules": "^4.1.6",
"eslint": "^10.13.0",
"loader.js": "^4.7.0",
"prettier": "^3.9.10",
Expand Down
39 changes: 23 additions & 16 deletions docs-app/testem.mjs → docs-app/testem.mts
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,46 @@
The command `DEVICE='w3-h3' ember test` runs all application, rendering, and
unit tests, as long as they are not marked with @w1, @w2, @h1, or @h2.
*/
const FILTERS = {
'w1-h1': '/^(?=(.*Acceptance))(?!(.*@w2|.*@w3|.*@h2|.*@h3))/',
'w2-h1': '/^(?=(.*Acceptance))(?!(.*@w1|.*@w3|.*@h2|.*@h3))/',
'w3-h1': '/^(?=(.*Acceptance))(?!(.*@w1|.*@w2|.*@h2|.*@h3))/',
type Device =
| 'w1-h1'
| 'w1-h2'
| 'w1-h3'
| 'w2-h1'
| 'w2-h2'
| 'w2-h3'
| 'w3-h1'
| 'w3-h2'
| 'w3-h3';

const FILTERS: Record<Device, string> = {
'w1-h1': '/^(?=(.*Acceptance))(?!(.*@w2|.*@w3|.*@h2|.*@h3))/',
'w1-h2': '/^(?=(.*Acceptance))(?!(.*@w2|.*@w3|.*@h1|.*@h3))/',
'w2-h2': '/^(?=(.*Acceptance))(?!(.*@w1|.*@w3|.*@h1|.*@h3))/',
'w3-h2': '/^(?=(.*Acceptance))(?!(.*@w1|.*@w2|.*@h1|.*@h3))/',

'w1-h3': '/^(?=(.*Acceptance))(?!(.*@w2|.*@w3|.*@h1|.*@h2))/',
'w2-h1': '/^(?=(.*Acceptance))(?!(.*@w1|.*@w3|.*@h2|.*@h3))/',
'w2-h2': '/^(?=(.*Acceptance))(?!(.*@w1|.*@w3|.*@h1|.*@h3))/',
'w2-h3': '/^(?=(.*Acceptance))(?!(.*@w1|.*@w3|.*@h1|.*@h2))/',
'w3-h1': '/^(?=(.*Acceptance))(?!(.*@w1|.*@w2|.*@h2|.*@h3))/',
'w3-h2': '/^(?=(.*Acceptance))(?!(.*@w1|.*@w2|.*@h1|.*@h3))/',
'w3-h3': '/^(?!(.*@w1|.*@w2|.*@h1|.*@h2))/',
};

const WINDOW_SIZES = {
const WINDOW_SIZES: Record<Device, string> = {
'w1-h1': '400,300',
'w2-h1': '900,300',
'w3-h1': '1400,300',

'w1-h2': '400,600',
'w2-h2': '900,600',
'w3-h2': '1400,600',

'w1-h3': '400,900',
'w2-h1': '900,300',
'w2-h2': '900,600',
'w2-h3': '900,900',
'w3-h1': '1400,300',
'w3-h2': '1400,600',
'w3-h3': '1400,900',
};

const { DEVICE = 'w3-h3' } = process.env;
const DEVICE = (process.env['DEVICE'] as Device | undefined) ?? 'w3-h3';

const filter = encodeURIComponent(FILTERS[DEVICE]);
const windowSize = WINDOW_SIZES[DEVICE];
const [width, height] = windowSize.split(',');
const [width, height] = windowSize.split(',') as [string, string];

export default {
browser_args: {
Expand Down
2 changes: 1 addition & 1 deletion packages/ember-container-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"ember-source": "~7.3.1",
"eslint": "^10.13.0",
"prettier": "^3.9.10",
"rollup": "^4.65.0",
"rollup": "^4.65.1",
"typescript": "^6.0.3"
},
"engines": {
Expand Down
Loading
Loading