Skip to content

Commit

Permalink
Fix test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Nov 7, 2019
1 parent b25dfaa commit 6fc91bc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
const { promisify } = require('util')

const pSetTimeout = promisify(setTimeout)

module.exports = {
name: 'netlify-plugin-test',
async init() {
process.kill(process.pid)
await pSetTimeout(1e4)
process.exit(1)
},
build() {
console.log('test')
Expand Down
2 changes: 1 addition & 1 deletion packages/build/tests/core/error/snapshots/tests.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Generated by [AVA](https://ava.li).
└─────────────────────────────┘␊
In "init" step from "netlify-plugin-test":␊
Plugin exited with exit code null and signal SIGTERM.␊
Plugin exited with exit code 1 and signal null.␊
Instead of calling process.exit(), plugin methods should either return (on success) or throw errors (on failure).␊
`

Expand Down
Binary file modified packages/build/tests/core/error/snapshots/tests.js.snap
Binary file not shown.

0 comments on commit 6fc91bc

Please sign in to comment.