Macros: v2 addon - #2779
Conversation
| }); | ||
|
|
||
| test('pnpm test', async function (assert) { | ||
| let result = await app.execute('pnpm test'); |
There was a problem hiding this comment.
This is great that it's testing the expected behaviour of the isTesting() macro in a test 👍 but we need the other side of the equation. We need something that will run the app (not in the tests) and check that some behaviour (hand wave 👋 ) is different from the test mode.
I recommend that you use the same infra that we have for testing the vite dev mode because it will run the vite dev server and you can visit the app and the tests separately and verify the behviour that way 👍
There was a problem hiding this comment.
pushed. we had no existing infra that I could find that actually looked at the output in-browser. only the CLI.
bec2a9f to
8a4f724
Compare
|
back in draft so I can abstract the vite + testem-proxy way of running qunit via vite dev + /tests for this PR |
8a4f724 to
1426cb6
Compare
1426cb6 to
00e921c
Compare
| }, | ||
| "scripts": { | ||
| "build": "vite build", | ||
| "build:test": "NODE_ENV=development vite build --mode development", |
There was a problem hiding this comment.
without cross-env (or the .env file), this fails on windows if invoked directly
| return fromEnv; | ||
| } | ||
|
|
||
| let candidates = [ |
There was a problem hiding this comment.
this should be default puppeteer behavior, tbh
There was a problem hiding this comment.
(is closer to testem)
There was a problem hiding this comment.
this exists because I need to visit the app and ask the DOM questions, which I am uncomfortable with forcing testem in that role
There was a problem hiding this comment.
(because isTesting() is not (always) a compiled thing, I need to assert actual runtime output)
For compatless apps, this is needed so that the embroiderResolver can resolve the runtime module in runtime mode correctly
todo:
is this relevant?: https://github.com/emberjs/ember.js/blob/295185931a184306b083af1bb1a3fc408ae85174/lib/index.cjs#L12