watch-dependency-graph
Advanced tools
Comparing version 1.0.0 to 1.1.0
const { EventEmitter } = require('events') | ||
const assert = require('assert') | ||
const chokidar = require('chokidar') | ||
@@ -91,4 +90,2 @@ const matched = require('matched') | ||
assert(entries.length, 'No entries found') | ||
for (const { id, children } of entries) { | ||
@@ -95,0 +92,0 @@ ids.push(id) |
{ | ||
"name": "watch-dependency-graph", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "DEBUG=wdg node -r esm test", | ||
"test": "node -r esm test", | ||
"test:watch": "npm run fixtures && nodemon -r esm test -i ./fixtures", | ||
@@ -9,0 +9,0 @@ "format": "prettier-standard --format", |
19
test.js
@@ -262,2 +262,21 @@ process.chdir(__dirname) | ||
test('watches for non-existing files', async () => { | ||
const instance = require('./')(path.join(fixturesRoot, '*.ghost.js')) | ||
const added = subscribe('add', instance) | ||
await wait(500) | ||
const ghostFile = path.join(fixturesRoot, 'a.ghost.js') | ||
fs.outputFileSync(ghostFile, 'module.exports = {}') | ||
const ids = await added | ||
assert(ids.includes(ghostFile)) | ||
assert(instance.ids.includes(ghostFile)) | ||
await instance.close() | ||
}) | ||
!(async function () { | ||
@@ -264,0 +283,0 @@ console.time('test') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18477
467