MCPcopy
hub / github.com/pugjs/pug / testDir

Function testDir

packages/pug-linker/test/index.test.js:5–13  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

3var link = require('../');
4
5function testDir(dir) {
6 fs.readdirSync(dir).forEach(function(name) {
7 if (!/\.input\.json$/.test(name)) return;
8 test(name, function() {
9 var actual = link(JSON.parse(fs.readFileSync(dir + '/' + name, 'utf8')));
10 expect(actual).toMatchSnapshot();
11 });
12 });
13}
14
15function testDirError(dir) {
16 fs.readdirSync(dir).forEach(function(name) {

Callers 1

index.test.jsFile · 0.85

Calls 2

linkFunction · 0.85
testFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…