Skip to content

Commit

Permalink
Merge pull request #1158 from alan-agius4/test-async
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Oct 8, 2021
2 parents b37688a + 7230778 commit a851e8b
Show file tree
Hide file tree
Showing 5 changed files with 3,177 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ jobs:

- name: Run lint
run: npm run lint

- name: Run dtslint
run: npm run dtslint
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"rimraf": "^3.0.0",
"sinon": "^9.0.1",
"sinon-chai": "^3.3.0",
"typescript": "~4.4.3",
"upath": "^1.2.0"
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import * as fs from "fs";
import { EventEmitter } from "events";
import { Matcher } from 'anymatch'
import { Matcher } from 'anymatch';

export class FSWatcher extends EventEmitter implements fs.FSWatcher {
options: WatchOptions;
Expand Down
4 changes: 3 additions & 1 deletion types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ watcher.add(["new-file-2", "new-file-3", "**/other-file*"]);
watcher.unwatch("new-file*");

// Only needed if watching is `persistent: true`.
watcher.close();
(async () => {
await watcher.close();
})();

// One-liner
chokidar
Expand Down
Loading

0 comments on commit a851e8b

Please sign in to comment.