Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gcnew committed Apr 23, 2017
1 parent d08960f commit 9c2a74c
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 2 deletions.
27 changes: 27 additions & 0 deletions tests/baselines/reference/exportBinding.errors.txt
@@ -0,0 +1,27 @@
tests/cases/conformance/es6/modules/exportConsts.ts(3,16): error TS2448: Block-scoped variable 'x' used before its declaration.
tests/cases/conformance/es6/modules/exportConsts.ts(3,16): error TS2454: Variable 'x' is used before being assigned.
tests/cases/conformance/es6/modules/exportVars.ts(3,16): error TS2454: Variable 'y' is used before being assigned.


==== tests/cases/conformance/es6/modules/exportConsts.ts (2 errors) ====
export { x }
export { x as xx }
export default x;
~
!!! error TS2448: Block-scoped variable 'x' used before its declaration.
~
!!! error TS2454: Variable 'x' is used before being assigned.

const x = 'x'

export { Y as Z }
class Y {}

==== tests/cases/conformance/es6/modules/exportVars.ts (1 errors) ====
export { y }
export { y as yy }
export default y;
~
!!! error TS2454: Variable 'y' is used before being assigned.
var y = 'y'

24 changes: 22 additions & 2 deletions tests/baselines/reference/exportBinding.js
@@ -1,19 +1,39 @@
//// [exportBinding.ts]
//// [tests/cases/conformance/es6/modules/exportBinding.ts] ////

//// [exportConsts.ts]
export { x }
export { x as xx }
export default x;

const x = 'x'

export { Y as Z }
class Y {}

//// [exportVars.ts]
export { y }
export { y as yy }
export default y;
var y = 'y'


//// [exportBinding.js]
//// [exportConsts.js]
"use strict";
exports.__esModule = true;
exports["default"] = x;
var x = 'x';
exports.x = x;
exports.xx = x;
var Y = (function () {
function Y() {
}
return Y;
}());
exports.Z = Y;
//// [exportVars.js]
"use strict";
exports.__esModule = true;
exports["default"] = y;
var y = 'y';
exports.y = y;
exports.yy = y;
12 changes: 12 additions & 0 deletions tests/cases/conformance/es6/modules/exportBinding.ts
@@ -1,5 +1,17 @@
// @filename: exportConsts.ts
// @strict: true
export { x }
export { x as xx }
export default x;

const x = 'x'

export { Y as Z }
class Y {}

// @filename: exportVars.ts
// @strict: true
export { y }
export { y as yy }
export default y;
var y = 'y'

0 comments on commit 9c2a74c

Please sign in to comment.