Skip to content

Commit 28dc879

Browse files
committed
Use yarn, update ava
1 parent c54b7d6 commit 28dc879

8 files changed

Lines changed: 2482 additions & 3470 deletions

File tree

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,14 @@ jspm_packages
3737
# Optional REPL history
3838
.node_repl_history
3939

40+
# yarn
41+
.pnp.*
42+
.yarn/*
43+
!.yarn/patches
44+
!.yarn/plugins
45+
!.yarn/releases
46+
!.yarn/sdks
47+
!.yarn/versions
48+
4049
test/temp/*
4150
!test/temp/.gitkeep

.yarn/releases/yarn-4.4.0.cjs

Lines changed: 925 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
yarnPath: .yarn/releases/yarn-4.4.0.cjs
2+
3+
nodeLinker: node-modules

lib/runners.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { state } from './state.js'
1+
import { resetStateForFile, state } from './state.js'
22
import { assert } from './assertions.js'
33
import { handleError } from './errors.js'
44
import { reporter, info } from './reporters.js'
@@ -10,7 +10,7 @@ export const getRunner = (tests) => {
1010

1111
if (currFile) {
1212
if (currFile !== state.lastFileName) {
13-
state.fileTestCount = 0
13+
resetStateForFile()
1414
info(`\nRunning tests for ${currFile}\n\n`)
1515
}
1616

lib/state.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ export const state = {
1515
verbose: initVerbose
1616
}
1717

18+
export const resetStateForFile = () => {
19+
state.fileTestCount = 0
20+
}
21+
1822
export const _setup = async (opts = {}) => {
1923
const setForKey = (k) => opts[k] !== undefined ? !!opts[k] : state[k]
2024
state.tap = setForKey('tap')

0 commit comments

Comments
 (0)