Skip to content

Commit 6da3535

Browse files
committed
Add WIP test
1 parent c141fd2 commit 6da3535

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

test/ContentBase.test.js

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
const path = require('path');
4+
const fs = require('fs');
45
const request = require('supertest');
56
const helper = require('./helper');
67
const config = require('./fixtures/contentbase-config/webpack.config');
@@ -38,6 +39,17 @@ describe('ContentBase', () => {
3839
it('Request to other file', (done) => {
3940
req.get('/other.html').expect(200, /Other html/, done);
4041
});
42+
43+
it('Watches recursively', (done) => {
44+
const nestedFile = path.join(contentBasePublic, 'assets/example.txt');
45+
46+
fs.truncateSync(nestedFile);
47+
fs.writeFileSync(nestedFile, 'Heyo', 'utf8');
48+
49+
// TODO check if the browser has refreshed
50+
51+
done();
52+
});
4153
});
4254

4355
describe('to directories', () => {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Heyo

0 commit comments

Comments
 (0)