Skip to content

Commit

Permalink
fix old conditions test
Browse files Browse the repository at this point in the history
`exports` is only supported withing a module directory, so the "fake
modules" needs to reside within `node_modules`
  • Loading branch information
SimenB committed Oct 14, 2021
1 parent fef762f commit 71f078a
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 41 deletions.
2 changes: 1 addition & 1 deletion e2e/resolve-conditions/__tests__/browser.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @jest-environment <rootDir>/browser-env.js
*/

import {fn} from '../fake-dual-dep';
import {fn} from 'fake-dual-dep';

test('returns correct message', () => {
expect(fn()).toEqual('hello from browser');
Expand Down
2 changes: 1 addition & 1 deletion e2e/resolve-conditions/__tests__/node.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @jest-environment <rootDir>/node-env.js
*/

import {fn} from '../fake-dual-dep';
import {fn} from 'fake-dual-dep';

test('returns correct message', () => {
expect(fn()).toEqual('hello from node');
Expand Down
2 changes: 1 addition & 1 deletion e2e/resolve-conditions/__tests__/resolveCjs.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

const {fn} = require('../fake-dep');
const {fn} = require('fake-dep');

test('returns correct message', () => {
expect(fn()).toEqual('hello from CJS');
Expand Down
2 changes: 1 addition & 1 deletion e2e/resolve-conditions/__tests__/resolveEsm.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {fn} from '../fake-dep';
import {fn} from 'fake-dep';

test('returns correct message', () => {
expect(fn()).toEqual('hello from ESM');
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion e2e/resolve-conditions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"mjs",
"json"
],
"resolver": "<rootDir>/resolver.js",
"testMatch": [
"<rootDir>/**/*.test.*"
],
Expand Down
36 changes: 0 additions & 36 deletions e2e/resolve-conditions/resolver.js

This file was deleted.

0 comments on commit 71f078a

Please sign in to comment.