flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
31
BACK_BACK/node_modules/@parcel/watcher/test/fswatcher.js
generated
vendored
Executable file
31
BACK_BACK/node_modules/@parcel/watcher/test/fswatcher.js
generated
vendored
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
const Watcher = require('../index');
|
||||
const {sleep} = require('@parcel/test-utils');
|
||||
const assert = require('assert');
|
||||
|
||||
describe('Watcher', function() {
|
||||
it('Should be able to create a new watcher', async () => {
|
||||
let watcher = new Watcher();
|
||||
|
||||
assert(!!watcher.child);
|
||||
assert(!watcher.ready);
|
||||
|
||||
await sleep(1000);
|
||||
|
||||
assert(!!watcher.child);
|
||||
assert(watcher.ready);
|
||||
|
||||
await watcher.stop();
|
||||
});
|
||||
|
||||
it('Should be able to properly destroy the watcher', async () => {
|
||||
let watcher = new Watcher();
|
||||
|
||||
await sleep(1000);
|
||||
|
||||
assert(!!watcher.child);
|
||||
assert(watcher.ready);
|
||||
|
||||
await watcher.stop();
|
||||
assert(watcher.child.killed);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue