Skip to content

Commit ef90cad

Browse files
committed
test file name pattern
1 parent 0e05895 commit ef90cad

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed
File renamed without changes.

tests/static-assets-test.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
var expect = require('chai').expect;
2+
var server = require('./demo-express-server.js');
3+
var fs = require('fs');
4+
5+
describe('MiniProfiler Static Assets Tests', function() {
6+
before(server.start);
7+
after(server.stop);
8+
9+
var files = [
10+
'includes.css',
11+
'includes.tmpl',
12+
'includes.js'
13+
]
14+
15+
files.forEach((file) => {
16+
it(`Should return ${file} file`, function(done) {
17+
server.get(`/mini-profiler-resources/${file}`, (err, response, body) => {
18+
expect(body).to.be.equal(fs.readFileSync(`./ui/${file}`, 'utf-8'));
19+
done();
20+
});
21+
});
22+
});
23+
24+
});
File renamed without changes.

0 commit comments

Comments
 (0)