Skip to content

Commit 18ead7f

Browse files
committed
Remove commented-out tests that were an experiment
1 parent 8ecc299 commit 18ead7f

1 file changed

Lines changed: 0 additions & 44 deletions

File tree

unitTests/config/rootConfigWatcher.test.ts

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -62,48 +62,4 @@ describe('RootConfigWatcher', () => {
6262
'RootConfigWatcher should not have a config property after close() is called'
6363
);
6464
});
65-
66-
// Maybe the behavior below isn't what we want after all...
67-
68-
// it('should emit ready even if watched file does not exit', async () => {
69-
// const configWatcher = new RootConfigWatcher();
70-
// try {
71-
// await Promise.race([
72-
// once(configWatcher, 'ready'),
73-
// new Promise((_, reject) => setTimeout(reject, 1000)),
74-
// ]);
75-
// assert.ok(true);
76-
// } catch (err) {
77-
// assert.fail('config file watcher should have emitted ready event before timeout');
78-
// }
79-
// });
80-
//
81-
// it('should emit ready even if watched file is empty', async () => {
82-
// writeFileSync(configFilePath, '');
83-
// const configWatcher = new RootConfigWatcher();
84-
// try {
85-
// await Promise.race([
86-
// once(configWatcher, 'ready'),
87-
// new Promise((_, reject) => setTimeout(reject, 1000)),
88-
// ]);
89-
// assert.ok(true);
90-
// } catch (err) {
91-
// assert.fail('config file watcher should have emitted ready event before timeout');
92-
// }
93-
// });
94-
//
95-
// it('should emit change if previously non-existent file gets created', (done) => {
96-
// const configWatcher = new RootConfigWatcher();
97-
// configWatcher.on('change', (config) => {
98-
// assert.deepEqual(config, { foo: 'bar' }, 'change event should have the new config');
99-
// done();
100-
// });
101-
// setTimeout(() => {
102-
// assert.fail('change event should have been emitted before timeout');
103-
// }, 2000);
104-
// // don't race the file watcher
105-
// setTimeout(() => {
106-
// writeFileSync(configFilePath, stringify({ foo: 'bar' }));
107-
// }, 5);
108-
// });
10965
});

0 commit comments

Comments
 (0)