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: normalize test config #643
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
b72d521
to
da483d1
Compare
9b9495d
to
62065a6
Compare
9009897
to
70a2875
Compare
fe9e6eb
to
7e5eb91
Compare
6d08610
to
f69b08b
Compare
7e5eb91
to
ceb7409
Compare
ceb7409
to
0cea079
Compare
@@ -11,7 +11,7 @@ | |||
}, | |||
"scripts": { | |||
"test": "npm run test:run", | |||
"test:run": "ava --timeout=30s test/index.js", | |||
"test:run": "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.
(can be ignored) IMHO the arguments are more convenient as one can copy the call and modify/extend without thinking of the configuration elsewhere, but I'm ok with this change as it provides benefits elsewhere. Consistency is more valuable than copy-pasting.
t.notThrows(() => { | ||
espree.parse(code, { | ||
ecmaVersion: ECMA_VERSION, | ||
}) |
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.
(should) This test used to be more informative.
It's likely that if this test fails, it does so unexpectedly and a more descriptive message (ie containing the runtime.js` filename) is going to be helpful for the person encountering it.
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.
- I'll restore the custom failure output, but keep it in an ava test.
@@ -1,7 +1,15 @@ | |||
const test = require('ava') | |||
const { utils: { mergePolicy, mergeConfigEntire, objToMap, mapToObj } } = require('../src/index') | |||
|
|||
testMergePartial('upgrades reads to writes', { | |||
const testMergePartial = test.macro( |
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.
Nice! when was it introduced? I haven't seen test.macro used before.
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.
I have no idea, I'm new to ava
, but discovered this while I was poking around.
34b2c42
to
61db1f9
Compare
This change does the following: 1. Upgrade `ava`. 2. Rename all test file extensions to `.spec.js`. 3. Relocate all Ava config into the `package.json` of each workspace. 4. Change some commented-out tests to skipped tests. 5. BONUS: Config to run all tests via e.g., `npm exec ava` from the workspace root
30d88e0
to
96c905b
Compare
This change does the following:
ava
..spec.js
.package.json
of each workspace.npm exec ava
from the workspace root