-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Migrate node tests to scenarios #21147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -133,7 +133,6 @@ | |
| "github": "^0.2.3", | ||
| "glob": "^8.0.3", | ||
| "globals": "^16.0.0", | ||
| "html-differ": "^1.4.0", | ||
| "kill-port-process": "^3.2.1", | ||
| "mocha": "^10.2.0", | ||
| "node-gzip": "^1.1.2", | ||
|
|
@@ -144,7 +143,6 @@ | |
| "resolve.exports": "^2.0.3", | ||
| "rollup": "^4.57.1", | ||
| "rsvp": "^4.8.5", | ||
| "simple-dom": "^1.4.0", | ||
| "table": "^6.9.0", | ||
| "terser": "^5.42.0", | ||
| "testem": "^3.10.1", | ||
|
|
@@ -390,4 +388,4 @@ | |
| } | ||
| }, | ||
| "packageManager": "[email protected]" | ||
| } | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "name": "ember-test-node-template", | ||
| "version": "0.0.0", | ||
| "private": true, | ||
| "description": "Node-focused smoke test template for ember-source", | ||
| "scripts": { | ||
| "test:node": "qunit tests/node/**/*-test.js" | ||
| }, | ||
| "dependencies": { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can any deps move out of the main package.json?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and then linked via scenario? or?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just thought there might be test-only deps able to be moved into this package.json from the root
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh I see -- i'll check
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. found 2 |
||
| "git-repo-info": "^2.1.1", | ||
| "html-differ": "^1.4.0", | ||
| "qunit": "^2.20.1", | ||
| "semver": "^7.6.0", | ||
| "simple-dom": "^1.4.0" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import { nodeScenarios } from './scenarios'; | ||
| import type { PreparedApp, Scenarios } from 'scenario-tester'; | ||
| import * as QUnit from 'qunit'; | ||
|
|
||
| const { module: Qmodule, test } = QUnit; | ||
| QUnit.config.testTimeout = 120_000; | ||
|
|
||
| function nodeTests(scenarios: Scenarios) { | ||
| scenarios | ||
| .map('node-tests', (_project) => {}) | ||
| .forEachScenario((scenario) => { | ||
| Qmodule(scenario.name, function (hooks) { | ||
| let app: PreparedApp; | ||
|
|
||
| hooks.before(async () => { | ||
| app = await scenario.prepare(); | ||
| }); | ||
|
|
||
| test('node tests', async function (assert) { | ||
| let result = await app.execute(`pnpm test:node`); | ||
| assert.equal(result.exitCode, 0, result.output); | ||
| }); | ||
| }); | ||
| }); | ||
| } | ||
|
|
||
| nodeTests(nodeScenarios); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prob the tests/node lines can drop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a utils test (the buildinfo) still in there --- it tests are infra rather than the behavior of ember-source, so I guess it still makes sense to have there -- your earlier gut feeling was good