-
-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #377 from smphhh/const-enum-re-export
Add test for handling re-exported const enums (issue #376)
- Loading branch information
Showing
36 changed files
with
638 additions
and
36 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
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
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,3 @@ | ||
import { BarEnum } from './foo'; | ||
|
||
console.log(BarEnum.Bar); |
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,3 @@ | ||
export const enum BarEnum { | ||
Bar = 1 | ||
}; |
52 changes: 52 additions & 0 deletions
52
test/comparison-tests/constEnumReExportWatch/expectedOutput-2.0/bundle.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,52 @@ | ||
/******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
|
||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
|
||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) | ||
/******/ return installedModules[moduleId].exports; | ||
|
||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ exports: {}, | ||
/******/ id: moduleId, | ||
/******/ loaded: false | ||
/******/ }; | ||
|
||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
|
||
/******/ // Flag the module as loaded | ||
/******/ module.loaded = true; | ||
|
||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
|
||
|
||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
|
||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
|
||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
|
||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(0); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ function(module, exports) { | ||
|
||
"use strict"; | ||
console.log(1 /* Bar */); | ||
|
||
|
||
/***/ } | ||
/******/ ]); |
74 changes: 74 additions & 0 deletions
74
test/comparison-tests/constEnumReExportWatch/expectedOutput-2.0/bundle.transpiled.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,74 @@ | ||
/******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
|
||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
|
||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) | ||
/******/ return installedModules[moduleId].exports; | ||
|
||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ exports: {}, | ||
/******/ id: moduleId, | ||
/******/ loaded: false | ||
/******/ }; | ||
|
||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
|
||
/******/ // Flag the module as loaded | ||
/******/ module.loaded = true; | ||
|
||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
|
||
|
||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
|
||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
|
||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
|
||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(0); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
"use strict"; | ||
var foo_1 = __webpack_require__(1); | ||
console.log(foo_1.BarEnum.Bar); | ||
|
||
|
||
/***/ }, | ||
/* 1 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
"use strict"; | ||
var bar_1 = __webpack_require__(2); | ||
exports.BarEnum = bar_1.BarEnum; | ||
|
||
|
||
/***/ }, | ||
/* 2 */ | ||
/***/ function(module, exports) { | ||
|
||
"use strict"; | ||
(function (BarEnum) { | ||
BarEnum[BarEnum["Bar"] = 1] = "Bar"; | ||
})(exports.BarEnum || (exports.BarEnum = {})); | ||
var BarEnum = exports.BarEnum; | ||
; | ||
|
||
|
||
/***/ } | ||
/******/ ]); |
6 changes: 6 additions & 0 deletions
6
test/comparison-tests/constEnumReExportWatch/expectedOutput-2.0/output.transpiled.txt
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 @@ | ||
Asset Size Chunks Chunk Names | ||
bundle.js 1.87 kB 0 [emitted] main | ||
chunk {0} bundle.js (main) 310 bytes [rendered] | ||
[0] ./.test/constEnumReExportWatch/app.ts 76 bytes {0} [built] | ||
[1] ./.test/constEnumReExportWatch/foo.ts 77 bytes {0} [built] | ||
[2] ./.test/constEnumReExportWatch/bar.ts 157 bytes {0} [built] |
4 changes: 4 additions & 0 deletions
4
test/comparison-tests/constEnumReExportWatch/expectedOutput-2.0/output.txt
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 @@ | ||
Asset Size Chunks Chunk Names | ||
bundle.js 1.43 kB 0 [emitted] main | ||
chunk {0} bundle.js (main) 40 bytes [rendered] | ||
[0] ./.test/constEnumReExportWatch/app.ts 40 bytes {0} [built] |
52 changes: 52 additions & 0 deletions
52
test/comparison-tests/constEnumReExportWatch/expectedOutput-2.0/patch0/bundle.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,52 @@ | ||
/******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
|
||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
|
||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) | ||
/******/ return installedModules[moduleId].exports; | ||
|
||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ exports: {}, | ||
/******/ id: moduleId, | ||
/******/ loaded: false | ||
/******/ }; | ||
|
||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
|
||
/******/ // Flag the module as loaded | ||
/******/ module.loaded = true; | ||
|
||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
|
||
|
||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
|
||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
|
||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
|
||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(0); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ function(module, exports) { | ||
|
||
"use strict"; | ||
console.log(2 /* Bar */); | ||
|
||
|
||
/***/ } | ||
/******/ ]); |
74 changes: 74 additions & 0 deletions
74
test/comparison-tests/constEnumReExportWatch/expectedOutput-2.0/patch0/bundle.transpiled.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,74 @@ | ||
/******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
/******/ var installedModules = {}; | ||
|
||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
|
||
/******/ // Check if module is in cache | ||
/******/ if(installedModules[moduleId]) | ||
/******/ return installedModules[moduleId].exports; | ||
|
||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = installedModules[moduleId] = { | ||
/******/ exports: {}, | ||
/******/ id: moduleId, | ||
/******/ loaded: false | ||
/******/ }; | ||
|
||
/******/ // Execute the module function | ||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | ||
|
||
/******/ // Flag the module as loaded | ||
/******/ module.loaded = true; | ||
|
||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
|
||
|
||
/******/ // expose the modules object (__webpack_modules__) | ||
/******/ __webpack_require__.m = modules; | ||
|
||
/******/ // expose the module cache | ||
/******/ __webpack_require__.c = installedModules; | ||
|
||
/******/ // __webpack_public_path__ | ||
/******/ __webpack_require__.p = ""; | ||
|
||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(0); | ||
/******/ }) | ||
/************************************************************************/ | ||
/******/ ([ | ||
/* 0 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
"use strict"; | ||
var foo_1 = __webpack_require__(1); | ||
console.log(foo_1.BarEnum.Bar); | ||
|
||
|
||
/***/ }, | ||
/* 1 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
|
||
"use strict"; | ||
var bar_1 = __webpack_require__(2); | ||
exports.BarEnum = bar_1.BarEnum; | ||
|
||
|
||
/***/ }, | ||
/* 2 */ | ||
/***/ function(module, exports) { | ||
|
||
"use strict"; | ||
(function (BarEnum) { | ||
BarEnum[BarEnum["Bar"] = 2] = "Bar"; | ||
})(exports.BarEnum || (exports.BarEnum = {})); | ||
var BarEnum = exports.BarEnum; | ||
; | ||
|
||
|
||
/***/ } | ||
/******/ ]); |
6 changes: 6 additions & 0 deletions
6
test/comparison-tests/constEnumReExportWatch/expectedOutput-2.0/patch0/output.transpiled.txt
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 @@ | ||
Asset Size Chunks Chunk Names | ||
bundle.js 1.87 kB 0 [emitted] main | ||
chunk {0} bundle.js (main) 310 bytes [rendered] | ||
[0] ./.test/constEnumReExportWatch/app.ts 76 bytes {0} | ||
[1] ./.test/constEnumReExportWatch/foo.ts 77 bytes {0} | ||
[2] ./.test/constEnumReExportWatch/bar.ts 157 bytes {0} [built] |
Oops, something went wrong.