| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 83f9604 commit 64a0c80
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,18 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + // Flags: --expose-internals | ||
| 3 | + | ||
| 4 | + // This test ensures that search throws errors appropriately | ||
| 5 | + | ||
| 6 | + const common = require('../common'); | ||
| 7 | + | ||
| 8 | + const search = require('internal/loader/search'); | ||
| 9 | + const errors = require('internal/errors'); | ||
| 10 | + | ||
| 11 | + common.expectsError( | ||
| 12 | + () => search('target', undefined), | ||
| 13 | + { | ||
| 14 | + code: 'ERR_MISSING_MODULE', | ||
| 15 | + type: errors.Error, | ||
| 16 | + message: 'Cannot find module target' | ||
| 17 | + } | ||
| 18 | + ); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments