Skip to content

Commit

Permalink
Add .js extension so tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
khiga8 committed May 16, 2024
1 parent 9deac20 commit f7d1592
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
extends: [require.resolve('./lib/configs/recommended'), 'plugin:eslint-plugin/all'],
plugins: ['eslint-plugin'],
rules: {
'import/extensions': 'off',
'import/no-commonjs': 'off',
'filenames/match-regex': 'off',
'i18n-text/no-en': 'off',
Expand Down
8 changes: 3 additions & 5 deletions tests/utils/get-element-type.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import {expect} from 'chai'
import {getElementType} from '../../lib/utils/get-element-type'
import {mockJSXAttribute, mockJSXConditionalAttribute, mockJSXOpeningElement} from './mocks'
import {getElementType} from '../../lib/utils/get-element-type.js'
import {mockJSXAttribute, mockJSXConditionalAttribute, mockJSXOpeningElement} from './mocks.js'

const mocha = require('mocha')
const describe = mocha.describe
const it = mocha.it
import {describe, it} from 'mocha'

function mockSetting(componentSetting = {}) {
return {
Expand Down
4 changes: 2 additions & 2 deletions tests/utils/get-role.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {expect} from 'chai'
import {getRole} from '../../lib/utils/get-role'
import {mockJSXAttribute, mockJSXConditionalAttribute, mockJSXOpeningElement} from './mocks'
import {getRole} from '../../lib/utils/get-role.js'
import {mockJSXAttribute, mockJSXConditionalAttribute, mockJSXOpeningElement} from './mocks.js'
import {describe, it} from 'mocha'

describe('getRole', function () {
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/object-map.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-check
import {expect} from 'chai'
import ObjectMap from '../../lib/utils/object-map'
import ObjectMap from '../../lib/utils/object-map.js'
import {describe, it} from 'mocha'

describe('ObjectMap', function () {
Expand Down

0 comments on commit f7d1592

Please sign in to comment.