-
Notifications
You must be signed in to change notification settings - Fork 66
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
chore(core): run scenarios in ava context #996
base: main
Are you sure you want to change the base?
Conversation
b162047
to
fe0b74e
Compare
fe0b74e
to
97888b0
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @boneskull and the rest of your teammates on Graphite |
10564d1
to
4a630df
Compare
166c953
to
8fcab2f
Compare
4a630df
to
220df6a
Compare
57c36e5
to
9408aa2
Compare
9408aa2
to
c924dc3
Compare
58360bf
to
1202208
Compare
1202208
to
ac6807f
Compare
ee6922e
to
904dfc6
Compare
import { loadScenarios } from './scenarios/index.js' | ||
import Util from './util.js' | ||
|
||
// TODO: figure out why TS does not like the named exports from util.js |
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.
likely because it's cjs
@@ -0,0 +1,26 @@ | |||
// @ts-check | |||
|
|||
import test from 'ava' |
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.
Why was the switch to esm necessary?
If only for top-level await, then we can wrap it in an async function and stay within cjs
904dfc6
to
c56a754
Compare
528ffcf
to
23e0b01
Compare
This changes the `runScenarios` test so that there's a 1:1 mapping between each scenario and an Ava test. This requires changing the file to be `.mjs`, however. Also: ESLint is mightily confused, and after hammering on it for a little bit, I still couldn't figure out what magic incantations I needed to get it to parse the file. Take it or leave it!
23e0b01
to
e0354cc
Compare
This changes the
runScenarios
test so that there's a 1:1 mapping between each scenario and an Ava test.This requires changing the file to be
.mjs
, however.Also: ESLint is mightily confused, and after hammering on it for a little bit, I still couldn't figure out what magic incantations I needed to get it to parse the file.
Take it or leave it! (by that I mean: I totally understand if nobody wants to merge this. I'm not sure I do!)