| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,13 +5,6 @@ with(this){__filename} | |||
| 5 | 5 | ||
| 6 | 6 | SyntaxError: Strict mode code may not include a with statement | |
| 7 | 7 | ||
| 8 | - | ||
| 9 | - | ||
| 10 | - | ||
| 11 | - | ||
| 12 | - | ||
| 13 | - | ||
| 14 | - | ||
| 15 | 8 | Node.js * | |
| 16 | 9 | 42 | |
| 17 | 10 | 42 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,25 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + | ||
| 3 | + require('../../common'); | ||
| 4 | + | ||
| 5 | + const spawnSync = require('child_process').spawnSync; | ||
| 6 | + | ||
| 7 | + const queue = [ | ||
| 8 | + 'enum Foo{};', | ||
| 9 | + 'throw new SyntaxError("hello")', | ||
| 10 | + 'const foo;', | ||
| 11 | + 'let x: number = 100;x;', | ||
| 12 | + 'const foo: string = 10;', | ||
| 13 | + 'function foo(){};foo<Number>(1);', | ||
| 14 | + 'interface Foo{};const foo;', | ||
| 15 | + 'function foo(){ await Promise.resolve(1)};', | ||
| 16 | + ]; | ||
| 17 | + | ||
| 18 | + for (const cmd of queue) { | ||
| 19 | + const args = ['--disable-warning=ExperimentalWarning','--experimental-strip-types', '-p', cmd]; | ||
| 20 | + const result = spawnSync(process.execPath, args, { | ||
| 21 | + stdio: 'pipe' | ||
| 22 | + }); | ||
| 23 | + process.stdout.write(result.stdout); | ||
| 24 | + process.stdout.write(result.stderr); | ||
| 25 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,48 @@ | |||
| 1 | + [eval]:1 | ||
| 2 | + enum Foo{}; | ||
| 3 | + ^^^^ | ||
| 4 | + x TypeScript enum is not supported in strip-only mode | ||
| 5 | + ,---- | ||
| 6 | + 1 | enum Foo{}; | ||
| 7 | + : ^^^^^^^^^^ | ||
| 8 | + `---- | ||
| 9 | + | ||
| 10 | + SyntaxError: Unexpected reserved word | ||
| 11 | + | ||
| 12 | + Node.js * | ||
| 13 | + [eval]:1 | ||
| 14 | + throw new SyntaxError("hello") | ||
| 15 | + ^ | ||
| 16 | + | ||
| 17 | + SyntaxError: hello | ||
| 18 | + | ||
| 19 | + Node.js * | ||
| 20 | + [eval]:1 | ||
| 21 | + const foo; | ||
| 22 | + ^^^ | ||
| 23 | + | ||
| 24 | + SyntaxError: Missing initializer in const declaration | ||
| 25 | + | ||
| 26 | + Node.js * | ||
| 27 | + 100 | ||
| 28 | + undefined | ||
| 29 | + false | ||
| 30 | + [eval]:1 | ||
| 31 | + ;const foo; | ||
| 32 | + ^^^ | ||
| 33 | + | ||
| 34 | + SyntaxError: Missing initializer in const declaration | ||
| 35 | + | ||
| 36 | + Node.js * | ||
| 37 | + [eval]:1 | ||
| 38 | + function foo(){ await Promise.resolve(1)}; | ||
| 39 | + ^^^^^ | ||
| 40 | + x await isn't allowed in non-async function | ||
| 41 | + ,---- | ||
| 42 | + 1 | function foo(){ await Promise.resolve(1)}; | ||
| 43 | + : ^^^^^^^ | ||
| 44 | + `---- | ||
| 45 | + | ||
| 46 | + SyntaxError: await is only valid in async functions and the top level bodies of modules | ||
| 47 | + | ||
| 48 | + Node.js * | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,6 @@ with(this){__filename} | |||
| 8 | 8 | : ^^^^ | |
| 9 | 9 | `---- | |
| 10 | 10 | ||
| 11 | - | ||
| 12 | 11 | SyntaxError: Strict mode code may not include a with statement | |
| 13 | 12 | ||
| 14 | 13 | Node.js * | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,17 +7,8 @@ enum Foo{}; | |||
| 7 | 7 | : ^^^^^^^^^^ | |
| 8 | 8 | `---- | |
| 9 | 9 | ||
| 10 | - | ||
| 11 | 10 | SyntaxError: Unexpected reserved word | |
| 12 | 11 | ||
| 13 | - | ||
| 14 | - | ||
| 15 | - | ||
| 16 | - | ||
| 17 | - | ||
| 18 | - | ||
| 19 | - | ||
| 20 | - | ||
| 21 | 12 | Node.js * | |
| 22 | 13 | [stdin]:1 | |
| 23 | 14 | enum Foo{}; | |
@@ -28,81 +19,36 @@ enum Foo{}; | |||
| 28 | 19 | : ^^^^^^^^^^ | |
| 29 | 20 | `---- | |
| 30 | 21 | ||
| 31 | - | ||
| 32 | 22 | SyntaxError: Unexpected reserved word | |
| 33 | 23 | ||
| 34 | - | ||
| 35 | - | ||
| 36 | - | ||
| 37 | - | ||
| 38 | - | ||
| 39 | - | ||
| 40 | - | ||
| 41 | - | ||
| 42 | 24 | Node.js * | |
| 43 | 25 | [stdin]:1 | |
| 44 | 26 | throw new SyntaxError("hello") | |
| 45 | 27 | ^ | |
| 46 | 28 | ||
| 47 | 29 | SyntaxError: hello | |
| 48 | 30 | ||
| 49 | - | ||
| 50 | - | ||
| 51 | - | ||
| 52 | - | ||
| 53 | - | ||
| 54 | - | ||
| 55 | - | ||
| 56 | - | ||
| 57 | - | ||
| 58 | - | ||
| 59 | 31 | Node.js * | |
| 60 | 32 | [stdin]:1 | |
| 61 | 33 | throw new SyntaxError("hello") | |
| 62 | 34 | ^ | |
| 63 | 35 | ||
| 64 | 36 | SyntaxError: hello | |
| 65 | 37 | ||
| 66 | - | ||
| 67 | - | ||
| 68 | - | ||
| 69 | - | ||
| 70 | - | ||
| 71 | - | ||
| 72 | - | ||
| 73 | - | ||
| 74 | - | ||
| 75 | - | ||
| 76 | 38 | Node.js * | |
| 77 | 39 | [stdin]:1 | |
| 78 | 40 | const foo; | |
| 79 | 41 | ^^^ | |
| 80 | 42 | ||
| 81 | 43 | SyntaxError: Missing initializer in const declaration | |
| 82 | 44 | ||
| 83 | - | ||
| 84 | - | ||
| 85 | - | ||
| 86 | - | ||
| 87 | - | ||
| 88 | - | ||
| 89 | - | ||
| 90 | - | ||
| 91 | 45 | Node.js * | |
| 92 | 46 | [stdin]:1 | |
| 93 | 47 | const foo; | |
| 94 | 48 | ^^^ | |
| 95 | 49 | ||
| 96 | 50 | SyntaxError: Missing initializer in const declaration | |
| 97 | 51 | ||
| 98 | - | ||
| 99 | - | ||
| 100 | - | ||
| 101 | - | ||
| 102 | - | ||
| 103 | - | ||
| 104 | - | ||
| 105 | - | ||
| 106 | 52 | Node.js * | |
| 107 | 53 | 100 | |
| 108 | 54 | 100 | |
@@ -116,29 +62,13 @@ false | |||
| 116 | 62 | ||
| 117 | 63 | SyntaxError: Missing initializer in const declaration | |
| 118 | 64 | ||
| 119 | - | ||
| 120 | - | ||
| 121 | - | ||
| 122 | - | ||
| 123 | - | ||
| 124 | - | ||
| 125 | - | ||
| 126 | - | ||
| 127 | 65 | Node.js * | |
| 128 | 66 | [stdin]:1 | |
| 129 | 67 | ;const foo; | |
| 130 | 68 | ^^^ | |
| 131 | 69 | ||
| 132 | 70 | SyntaxError: Missing initializer in const declaration | |
| 133 | 71 | ||
| 134 | - | ||
| 135 | - | ||
| 136 | - | ||
| 137 | - | ||
| 138 | - | ||
| 139 | - | ||
| 140 | - | ||
| 141 | - | ||
| 142 | 72 | Node.js * | |
| 143 | 73 | [stdin]:1 | |
| 144 | 74 | function foo(){ await Promise.resolve(1)}; | |
@@ -149,17 +79,8 @@ function foo(){ await Promise.resolve(1)}; | |||
| 149 | 79 | : ^^^^^^^ | |
| 150 | 80 | `---- | |
| 151 | 81 | ||
| 152 | - | ||
| 153 | 82 | SyntaxError: await is only valid in async functions and the top level bodies of modules | |
| 154 | 83 | ||
| 155 | - | ||
| 156 | - | ||
| 157 | - | ||
| 158 | - | ||
| 159 | - | ||
| 160 | - | ||
| 161 | - | ||
| 162 | - | ||
| 163 | 84 | Node.js * | |
| 164 | 85 | [stdin]:1 | |
| 165 | 86 | function foo(){ await Promise.resolve(1)}; | |
@@ -170,16 +91,7 @@ function foo(){ await Promise.resolve(1)}; | |||
| 170 | 91 | : ^^^^^^^ | |
| 171 | 92 | `---- | |
| 172 | 93 | ||
| 173 | - | ||
| 174 | 94 | SyntaxError: await is only valid in async functions and the top level bodies of modules | |
| 175 | 95 | ||
| 176 | - | ||
| 177 | - | ||
| 178 | - | ||
| 179 | - | ||
| 180 | - | ||
| 181 | - | ||
| 182 | - | ||
| 183 | - | ||
| 184 | 96 | Node.js * | |
| 185 | 97 | done | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,12 +10,12 @@ describe('eval output', { concurrency: true }, () => { | |||
| 10 | 10 | } | |
| 11 | 11 | ||
| 12 | 12 | const defaultTransform = snapshot.transform( | |
| 13 | - removeStackTraces, | ||
| 14 | - filterEmptyLines, | ||
| 15 | 13 | normalize, | |
| 16 | 14 | snapshot.replaceWindowsLineEndings, | |
| 17 | 15 | snapshot.replaceWindowsPaths, | |
| 18 | - snapshot.replaceNodeVersion | ||
| 16 | + snapshot.replaceNodeVersion, | ||
| 17 | + removeStackTraces, | ||
| 18 | + filterEmptyLines, | ||
| 19 | 19 | ); | |
| 20 | 20 | ||
| 21 | 21 | function removeStackTraces(output) { | |
@@ -30,6 +30,7 @@ describe('eval output', { concurrency: true }, () => { | |||
| 30 | 30 | { name: 'eval/eval_messages.js' }, | |
| 31 | 31 | { name: 'eval/stdin_messages.js' }, | |
| 32 | 32 | { name: 'eval/stdin_typescript.js' }, | |
| 33 | + { name: 'eval/eval_typescript.js' }, | ||
| 33 | 34 | ]; | |
| 34 | 35 | ||
| 35 | 36 | for (const { name } of tests) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments