Skip to content

Commit

Permalink
fix: skip before and after hooks when no tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomrdias committed Oct 17, 2023
1 parent 7111801 commit 2c5ca4f
Show file tree
Hide file tree
Showing 5 changed files with 395 additions and 291 deletions.
29 changes: 29 additions & 0 deletions mocks/tops/multiple.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { suite, assert, test as _test } from '../../src/taps/index.js'

let test = suite('suite1')

test.before(() => {
console.log('before')
})

test.after(() => {
console.log('after')
})

test('test1', () => {
assert.equal(3, 3)
})

test = suite('suite2')

test.before(() => {
console.log('before')
})

test.after(() => {
console.log('after')
})

test.skip('test1', () => {
assert.equal(3, 3)
})
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"camelcase": "^8.0.0",
"chokidar": "^3.5.3",
"cpy": "^10.1.0",
"esbuild": "0.19.4",
"esbuild": "0.19.5",
"esbuild-plugin-wasm": "^1.1.0",
"events": "^3.3.0",
"execa": "^8.0.1",
Expand All @@ -89,11 +89,11 @@
"lilconfig": "^2.1.0",
"lodash": "^4.17.21",
"merge-options": "^3.0.4",
"nanoid": "^5.0.1",
"nanoid": "^5.0.2",
"ora": "^7.0.1",
"p-timeout": "^6.1.2",
"path-browserify": "^1.0.1",
"playwright-core": "1.38.1",
"playwright-core": "1.39.0",
"polka": "^0.5.2",
"premove": "^4.0.0",
"process": "^0.11.10",
Expand All @@ -114,12 +114,12 @@
"copyfiles": "^2.4.1",
"debug": "^4.3.4",
"delay": "^6.0.0",
"hd-scripts": "^9.0.5",
"lint-staged": "^14.0.1",
"hd-scripts": "^9.0.6",
"lint-staged": "^15.0.1",
"mocha": "^10.2.0",
"p-defer": "^4.0.0",
"simple-git-hooks": "^2.9.0",
"tape": "^5.6.6",
"tape": "^5.7.1",
"tinybench": "^2.5.1",
"typescript": "^5.2.2",
"uvu": "^0.5.6",
Expand Down
Loading

0 comments on commit 2c5ca4f

Please sign in to comment.