| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7cf19ab commit 02f606d
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -116,6 +116,38 @@ function nextdir() { | |||
| 116 | 116 | ); | |
| 117 | 117 | } | |
| 118 | 118 | ||
| 119 | + // base64 encoding error does not crash application. | ||
| 120 | + { | ||
| 121 | + const coverageDirectory = nextdir(); | ||
| 122 | + const output = spawnSync(process.execPath, [ | ||
| 123 | + require.resolve('../fixtures/source-map/inline-base64-type-error.js') | ||
| 124 | + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); | ||
| 125 | + assert.strictEqual(output.status, 0); | ||
| 126 | + assert.strictEqual(output.stderr.toString(), ''); | ||
| 127 | + const sourceMap = getSourceMapFromCache( | ||
| 128 | + 'inline-base64-type-error.js', | ||
| 129 | + coverageDirectory | ||
| 130 | + ); | ||
| 131 | + | ||
| 132 | + assert.strictEqual(sourceMap.data, null); | ||
| 133 | + } | ||
| 134 | + | ||
| 135 | + // JSON error does not crash application. | ||
| 136 | + { | ||
| 137 | + const coverageDirectory = nextdir(); | ||
| 138 | + const output = spawnSync(process.execPath, [ | ||
| 139 | + require.resolve('../fixtures/source-map/inline-base64-json-error.js') | ||
| 140 | + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); | ||
| 141 | + assert.strictEqual(output.status, 0); | ||
| 142 | + assert.strictEqual(output.stderr.toString(), ''); | ||
| 143 | + const sourceMap = getSourceMapFromCache( | ||
| 144 | + 'inline-base64-json-error.js', | ||
| 145 | + coverageDirectory | ||
| 146 | + ); | ||
| 147 | + | ||
| 148 | + assert.strictEqual(sourceMap.data, null); | ||
| 149 | + } | ||
| 150 | + | ||
| 119 | 151 | // Does not apply source-map to stack trace if --experimental-modules | |
| 120 | 152 | // is not set. | |
| 121 | 153 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments