Files: ca90b5ca0579ebdcc0635288bce4978e3fb200f5 / test / test-50-not-found-wording-2 / test-x-index.js
303 bytesRaw
1 | ; |
2 | |
3 | var name = 'not-exists'; |
4 | var error1, error2; |
5 | |
6 | try { |
7 | require.resolve(name); |
8 | } catch (e) { |
9 | error1 = e; |
10 | } |
11 | |
12 | try { |
13 | require(name); |
14 | } catch (e) { |
15 | error2 = e; |
16 | } |
17 | |
18 | console.log([ |
19 | |
20 | error1.message.split('\n')[0], |
21 | error1.code, |
22 | error2.message.split('\n')[0], |
23 | error2.code |
24 | |
25 | ].join('\n')); |
26 |
Built with git-ssb-web