Skip to content

Commit

Permalink
Update tap and fixed husky (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina authored Apr 1, 2021
1 parent 42745e5 commit 99f7226
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
2 changes: 1 addition & 1 deletion .taprc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
esm: false
flow: false
ts: false
jsx: false
timeout: 120
check-coverage: false
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "index.js",
"scripts": {
"test-only": "tap test.js",
"test": "standard && tap test.js"
"test": "standard && tap test.js",
"prepare": "husky install"
},
"repository": {
"type": "git",
Expand All @@ -31,7 +32,7 @@
"husky": "^6.0.0",
"proxyquire": "^2.1.0",
"standard": "^16.0.3",
"tap": "^14.10.8"
"tap": "^15.0.1"
},
"dependencies": {
"atomic-sleep": "^1.0.0",
Expand Down
6 changes: 3 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const { test, tearDown } = require('tap')
const { test, teardown } = require('tap')
const { join } = require('path')
const { fork } = require('child_process')
const fs = require('fs')
Expand All @@ -18,7 +18,7 @@ function file () {
return file
}

tearDown(() => {
teardown(() => {
files.forEach((file) => {
try {
if (fs.existsSync(file)) {
Expand Down Expand Up @@ -478,7 +478,7 @@ function buildTests (test, sync) {
})

child.stdout.on('end', function () {
t.is(data, str)
t.equal(data, str)
})

child.on('close', function (code) {
Expand Down

0 comments on commit 99f7226

Please sign in to comment.