-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add testcase #828 and fix testcases
- Loading branch information
Showing
5 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const assert = require("assert"); | ||
const { parseBuildResult, moduleReg } = require("../../../scripts/test-utils"); | ||
const { distDir } = parseBuildResult(__dirname); | ||
|
||
const ret = require(path.join(distDir, 'index.js')).default(); | ||
assert(ret === 'abc', 'Run dist/index.js does not throw error.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "targets": { "ie": 11 }, "umd": true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
const [a, b] = ['abc', 2]; | ||
// 此行是为了在浏览器版本低的时候(比如 ie:11 或 chrome: 20)时添加 helper 方法 | ||
typeof b; | ||
exports.a = a; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import foo from './foo'; | ||
console.log(foo.a); | ||
export default () => { | ||
return foo.a; | ||
} |