Skip to content

Commit

Permalink
correct test case for side-effects-optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra authored and kdy1 committed May 18, 2024
1 parent 13abb64 commit 878ac68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as self from "./esm";
export * as self from "./esm";

export const getSelf = function getSelf() {
return self;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { getSelf } from "./esm";
import { getSelf, self } from "./esm";
import * as esm from "./esm";
const requiredEsm = require("./esm");

it("should have the same identity on all namespace objects", async () => {
expect(getSelf()).toBe(esm);
expect(self).toBe(esm);
expect(requiredEsm).toBe(esm);
const importedEsm = await import("./esm");
expect(importedEsm).toBe(esm);
Expand Down

0 comments on commit 878ac68

Please sign in to comment.