-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Add src/index.js Export a function. ENH: Add bin/cli Run the exported function from /src TST: Test cli command ENH: Add test/integration/cli.test.js
- Loading branch information
1 parent
629e8a2
commit 2ba2428
Showing
3 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env node | ||
const preciseWatcher = require('../src') | ||
|
||
preciseWatcher() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module.exports = () => { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { promisify } = require('util') | ||
const { execFile } = require('child_process') | ||
const execFileAsync = promisify(execFile) | ||
|
||
describe('precise-watcher', () => { | ||
it('Should work with defaults', async () => { | ||
const { stderr, stdout } = await execFileAsync('bin/cli') | ||
|
||
expect(stderr).toBe('') | ||
expect(stdout).toBe('') | ||
}) | ||
}) |