From 94d58778229a64d979216aa05c9a397269a0da84 Mon Sep 17 00:00:00 2001 From: Permutator Date: Sun, 7 Aug 2016 02:15:44 -0700 Subject: [PATCH] Added a test for not mangling the entry point --- .../does-not-mangle-entry-point/_config.js | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/function/does-not-mangle-entry-point/_config.js diff --git a/test/function/does-not-mangle-entry-point/_config.js b/test/function/does-not-mangle-entry-point/_config.js new file mode 100644 index 0000000..e93b7ff --- /dev/null +++ b/test/function/does-not-mangle-entry-point/_config.js @@ -0,0 +1,26 @@ +var path = require( 'path' ); +var fs = require( 'fs' ); +var assert = require( 'assert' ); + +var modules = { + 'x\\y': 'export default 42;', + 'x/y': 'export default 24;' +}; + +module.exports = { + description: 'does not mangle entry point', + options: { + entry: 'x\\y', + plugins: [{ + resolveId: function ( importee ) { + return importee; + }, + load: function ( moduleId ) { + return modules[ moduleId ]; + } + }] + }, + exports: function ( exports ) { + assert.equal( exports, 42 ); + } +};