(dir)
| 13 | } |
| 14 | |
| 15 | function testDirError(dir) { |
| 16 | fs.readdirSync(dir).forEach(function(name) { |
| 17 | if (!/\.input\.json$/.test(name)) return; |
| 18 | test(name, function() { |
| 19 | var input = JSON.parse(fs.readFileSync(dir + '/' + name, 'utf8')); |
| 20 | var err; |
| 21 | try { |
| 22 | link(input); |
| 23 | } catch (ex) { |
| 24 | err = { |
| 25 | msg: ex.msg, |
| 26 | code: ex.code, |
| 27 | line: ex.line, |
| 28 | }; |
| 29 | } |
| 30 | if (!err) throw new Error('Expected error'); |
| 31 | expect(err).toMatchSnapshot(); |
| 32 | }); |
| 33 | }); |
| 34 | } |
| 35 | |
| 36 | describe('cases from pug', function() { |
| 37 | testDir(__dirname + '/cases'); |
no test coverage detected
searching dependent graphs…