-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate test cases for discussion
- Loading branch information
Joel Jeske
committed
May 21, 2020
1 parent
8362b3a
commit 2d120e5
Showing
17 changed files
with
75 additions
and
92 deletions.
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
9 changes: 0 additions & 9 deletions
9
test/form/samples/system-multiple-class-export-bindings/_config.js
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
test/form/samples/system-multiple-class-export-bindings/_expected.js
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
test/form/samples/system-multiple-class-export-bindings/main.js
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
module.exports = { | ||
description: 'supports multiple live bindings for the same symbol in systemJS', | ||
options: { | ||
output: { | ||
format: 'system', | ||
exports: 'named' | ||
} | ||
} | ||
}; |
37 changes: 37 additions & 0 deletions
37
test/form/samples/system-multiple-export-bindings/_expected.js
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,37 @@ | ||
System.register([], function (exports) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
const x = exports('x', 123); | ||
const y = exports('y', 456); | ||
|
||
var namespace = /*#__PURE__*/Object.freeze({ | ||
__proto__: null, | ||
x: x, | ||
y: y | ||
}); | ||
exports({namespace: namespace, namespace2: namespace}); | ||
|
||
// Namespace variable | ||
|
||
// Variable Declaration | ||
let a = exports('default', exports('a2', exports('a', 1))), b = exports('b', 2), c = exports('c2', exports('c' = 3)); | ||
|
||
// Export default expression | ||
|
||
// Assignment Expression | ||
a = exports('default', exports('a2', exports('a', b = exports('b', c = exports('c2', exports('c', 0)))))); | ||
|
||
// Destructing Assignment Expression | ||
(function (v) {exports({a: a, a2: a, default: a, b: b, c: c, c2: c}); return v;} ({a, b, c} = { c: 4, b: 5, a: 6 })); | ||
|
||
// Update Expression | ||
a = exports('default', exports('a2', exports('a', a + 1))), b = exports('b', b + 1), c = exports('c2', exports('c', c + 1)); | ||
|
||
// Class Declaration | ||
export class A {} exports({ A: A, B: 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,25 @@ | ||
// Namespace variable | ||
import * as namespace from './namespace'; | ||
export { namespace, namespace as namespace2 } | ||
export * from './namespace'; | ||
|
||
// Variable Declaration | ||
export let a = 1, b = 2, c = 3; | ||
export { a as a2, c as c2 } | ||
|
||
// Export default expression | ||
export default a; | ||
|
||
// Assignment Expression | ||
a = b = c = 0; | ||
|
||
// Destructing Assignment Expression | ||
({ a, b, c } = { c: 4, b: 5, a: 6 }); | ||
|
||
// Update Expression | ||
a++, b++, ++c; | ||
|
||
// Class Declaration | ||
export class A {} | ||
export { A as B } | ||
|
2 changes: 2 additions & 0 deletions
2
test/form/samples/system-multiple-export-bindings/namespace.js
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,2 @@ | ||
export const x = 123; | ||
export const y = 456; |
10 changes: 0 additions & 10 deletions
10
test/form/samples/system-multiple-export-default-export-bindings/_config.js
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
test/form/samples/system-multiple-export-default-export-bindings/_expected.js
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
test/form/samples/system-multiple-export-default-export-bindings/main.js
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
test/form/samples/system-multiple-variable-declaration-export-bindings/_config.js
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
test/form/samples/system-multiple-variable-declaration-export-bindings/_expected.js
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
test/form/samples/system-multiple-variable-declaration-export-bindings/main.js
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
test/form/samples/system-multiple-variable-update-export-bindings copy/_config.js
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
test/form/samples/system-multiple-variable-update-export-bindings copy/_expected.js
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
test/form/samples/system-multiple-variable-update-export-bindings copy/main.js
This file was deleted.
Oops, something went wrong.