Skip to content

Commit

Permalink
Add import.meta.url unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoluc committed Mar 31, 2022
1 parent f19ab9c commit a75681b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/unit/import-meta-esm/input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log(import.meta.url);
7 changes: 7 additions & 0 deletions test/unit/import-meta-esm/output-coverage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/******/ /* webpack/runtime/compat */
/******/
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";
/******/
/************************************************************************/
var __webpack_exports__ = {};
console.log(import.meta.url);
7 changes: 7 additions & 0 deletions test/unit/import-meta-esm/output.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/******/ /* webpack/runtime/compat */
/******/
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";
/******/
/************************************************************************/
var __webpack_exports__ = {};
console.log(import.meta.url);
3 changes: 3 additions & 0 deletions test/unit/import-meta-esm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}

0 comments on commit a75681b

Please sign in to comment.