Skip to content

Commit a13f486

Browse files
git-online-helper[bot]patricklx
authored andcommitted
move ember debug tests into own app
1 parent 681f18f commit a13f486

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1854
-16
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ jobs:
4747
run: pnpm lint:hbs
4848
- name: Lint (js)
4949
run: pnpm lint:js
50-
- name: Run test
50+
- name: build
51+
run: EMBER_ENV=test pnpm ember build --environment test
52+
- name: test ember debug
53+
run: pnpm ember-debug:test
54+
- name: Run test inspector ui
5155
run: pnpm test
5256
env:
5357
COVERAGE: 'true'
@@ -110,14 +114,12 @@ jobs:
110114
- name: Set NO_EXTEND_PROTOTYPES
111115
if: matrix.scenario == 'ember-default-no-prototype-extensions'
112116
run: echo "NO_EXTEND_PROTOTYPES==true" >> .GITHUB_ENV
113-
- name: Setup ember-try scenario
114-
run: pnpm ember try:one ${{ matrix.scenario }} --skip-cleanup --- cat package.json
115-
- name: Build
117+
- name: Build Inspector
116118
run: pnpm ember build --environment test
119+
- name: Setup ember-try scenario
120+
run: pnpm ember-debug:try:one ${{ matrix.scenario }} --skip-cleanup --- cat package.json
117121
- name: Run test
118-
# Due to a bug in ember-cli, running `ember test` with `--path` doesn't set `EMBER_ENV=test`
119-
# See https://github.com/ember-cli/ember-cli/issues/8922
120-
run: EMBER_ENV=test pnpm ember test --path dist --filter="Ember Debug"
122+
run: pnpm ember-debug:test
121123

122124
build:
123125
name: Build extensions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
# dependencies
1010
/node_modules/
11+
/test-apps/classic/dist
12+
/test-apps/classic/node_modules
1113

1214
# misc
1315
/.env*

ember_debug/rollup.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default {
1111
'utils/type-check.js',
1212
'port.js',
1313
'utils/ember.js',
14+
'utils/type-check',
1415
'models/profile-node.js',
1516
'libs/promise-assembler.js',
1617
'lib/versions.js',

ember_debug/utils/version.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ export function isInVersionSpecifier(specifier, version) {
3434
let operator = specifier[0];
3535
if (Number.isNaN(+operator)) {
3636
specifier = specifier.slice(1);
37+
} else {
38+
return specifier === version;
3739
}
3840
specifier = cleanupVersion(specifier).split('.');
3941
version2 = cleanupVersion(version).split('.');

eslint.config.mjs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ export default ts.config(
6262
'dist/',
6363
'ember_debug/dist/',
6464
'node_modules/',
65+
'test-apps/classic/node_modules/',
66+
'test-apps/classic/dist/',
67+
'test-apps/classic/public/',
68+
'test-apps/tests/helpers/index.ts',
6569
'coverage/',
6670
'!**/.*',
6771
'vendor/',
@@ -93,6 +97,7 @@ export default ts.config(
9397
...globals.browser,
9498
basicContext: false,
9599
requireModule: false,
100+
chrome: true,
96101
},
97102
},
98103
},
@@ -113,10 +118,21 @@ export default ts.config(
113118
},
114119
},
115120
{
116-
files: ['tests/**/*-test.{js,gjs,ts,gts}'],
121+
files: [
122+
'tests/**/*-test.{js,gjs,ts,gts}',
123+
'test-apps/classic/tests/**/*-test.{js,gjs,ts,gts}',
124+
],
117125
plugins: {
118126
qunit,
119127
},
128+
languageOptions: {
129+
globals: {
130+
...globals.browser,
131+
basicContext: false,
132+
requireModule: false,
133+
chrome: true,
134+
},
135+
},
120136
},
121137
/**
122138
* CJS node files
@@ -125,15 +141,18 @@ export default ts.config(
125141
files: [
126142
'**/*.cjs',
127143
'config/**/*.js',
144+
'test-apps/classic/config/**/*.js',
128145
'lib/*/index.js',
129146
'scripts/**/*.js',
130147
'testem.js',
148+
'test-apps/classic/testem.js',
131149
'testem*.js',
132150
'.prettierrc.js',
133151
'.stylelintrc.js',
134152
'.template-lintrc.js',
135153
'babel.config.js',
136154
'ember-cli-build.js',
155+
'test-apps/classic/ember-cli-build.js',
137156
'gulpfile.js',
138157
],
139158
plugins: {

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@
3030
"start": "ember serve",
3131
"test": "concurrently \"pnpm:lint\" \"pnpm:test:*\" --names \"lint,test:\" --prefixColors auto",
3232
"test:ember": "pnpm build:ember-debug && COVERAGE=true ember test",
33-
"watch": "pnpm '/watch:/'",
3433
"watch-test": "pnpm '/watch-test:/'",
3534
"watch-test:ember-debug": "pnpm --filter ember-debug watch",
3635
"watch-test:inspector-ui": "ember test --serv",
36+
"watch": "pnpm '/watch:/'",
37+
"watch:inspector-ui": "ember build --watch",
3738
"watch:ember-debug": "pnpm --filter ember-debug watch",
38-
"watch:inspector-ui": "ember build --watch"
39+
"ember-debug:try:one": "pnpm --filter '*' ember:try:one",
40+
"ember-debug:test": "pnpm --filter '*' ember-debug-test"
3941
},
4042
"dependencies": {
4143
"got": "^11.8.6",

0 commit comments

Comments
 (0)