Skip to content

Commit

Permalink
Run Jest in ESM mode for the CRWA project
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe committed Dec 12, 2023
1 parent 0fb5b6b commit ea1d5a5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 0 additions & 2 deletions packages/create-redwood-app/.babelrc.js

This file was deleted.

2 changes: 2 additions & 0 deletions packages/create-redwood-app/.babelrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// For testing only.
export default { extends: '../../babel.config.js' }
2 changes: 1 addition & 1 deletion packages/create-redwood-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"build": "yarn node ./build.mjs",
"build:watch": "nodemon --watch src --ignore dist,template --exec \"yarn build\"",
"prepublishOnly": "NODE_ENV=production yarn build",
"test": "yarn run jest tests",
"test": "NODE_OPTIONS=--experimental-vm-modules yarn run jest tests",
"ts-to-js": "yarn node ./tsToJS.mjs"
},
"dependencies": {
Expand Down
4 changes: 4 additions & 0 deletions packages/create-redwood-app/tests/template.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import path from 'node:path'
import { fileURLToPath } from 'node:url'

import klawSync from 'klaw-sync'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)

const TS_TEMPLATE_DIR = path.join(__dirname, '../templates', 'ts')

describe('template', () => {
Expand Down

0 comments on commit ea1d5a5

Please sign in to comment.