Skip to content

Commit ce988b2

Browse files
committed
tests: update tests
1 parent 81a50bc commit ce988b2

39 files changed

+475
-188
lines changed

js/tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ it('should show a tooltip without the animation', () => {
5959
animation: false
6060
})
6161

62-
tooltipEl.addEventListener('shown.coreui.tooltip', () => {
63-
const tip = document.querySelector('.tooltip')
62+
tooltipEl.addEventListener('shown.coreui.tooltip', () => {
63+
const tip = document.querySelector('.tooltip')
6464

6565
expect(tip).not.toBeNull()
6666
expect(tip.classList.contains('fade')).toEqual(false)

js/tests/browsers.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
/* eslint-env node */
21
/* eslint-disable camelcase */
32

3+
'use strict'
4+
45
const browsers = {
56
safariMac: {
67
base: 'BrowserStack',

js/tests/integration/bundle-modularity.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable import/extensions, import/no-unassigned-import */
2+
13
import Tooltip from '../../dist/tooltip'
24
import '../../dist/carousel'
35

js/tests/integration/rollup.bundle-modularity.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/* eslint-env node */
1+
'use strict'
22

33
const commonjs = require('@rollup/plugin-commonjs')
4-
const configRollup = require('./rollup.bundle')
4+
const configRollup = require('./rollup.bundle.js')
55

66
const config = {
77
...configRollup,

js/tests/integration/rollup.bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-env node */
1+
'use strict'
22

33
const { babel } = require('@rollup/plugin-babel')
44
const { nodeResolve } = require('@rollup/plugin-node-resolve')

js/tests/karma.conf.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-env node */
2-
31
'use strict'
42

53
const path = require('node:path')
@@ -8,7 +6,7 @@ const { babel } = require('@rollup/plugin-babel')
86
const istanbul = require('rollup-plugin-istanbul')
97
const { nodeResolve } = require('@rollup/plugin-node-resolve')
108
const replace = require('@rollup/plugin-replace')
11-
const { browsers } = require('./browsers')
9+
const { browsers } = require('./browsers.js')
1210

1311
const ENV = process.env
1412
const BROWSERSTACK = Boolean(ENV.BROWSERSTACK)

js/tests/unit/alert.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import Alert from '../../src/alert'
2-
import { getTransitionDurationFromElement } from '../../src/util/index'
3-
import { clearFixture, getFixture, jQueryMock } from '../helpers/fixture'
1+
import Alert from '../../src/alert.js'
2+
import { getTransitionDurationFromElement } from '../../src/util/index.js'
3+
import { clearFixture, getFixture, jQueryMock } from '../helpers/fixture.js'
44

55
describe('Alert', () => {
66
let fixtureEl

js/tests/unit/base-component.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import BaseComponent from '../../src/base-component'
2-
import { clearFixture, getFixture } from '../helpers/fixture'
3-
import EventHandler from '../../src/dom/event-handler'
4-
import { noop } from '../../src/util'
1+
import BaseComponent from '../../src/base-component.js'
2+
import EventHandler from '../../src/dom/event-handler.js'
3+
import { noop } from '../../src/util/index.js'
4+
import { clearFixture, getFixture } from '../helpers/fixture.js'
55

66
class DummyClass extends BaseComponent {
77
constructor(element) {

js/tests/unit/button.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Button from '../../src/button'
2-
import { getFixture, clearFixture, jQueryMock } from '../helpers/fixture'
1+
import Button from '../../src/button.js'
2+
import { clearFixture, getFixture, jQueryMock } from '../helpers/fixture.js'
33

44
describe('Button', () => {
55
let fixtureEl

js/tests/unit/carousel.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import Carousel from '../../src/carousel'
2-
import EventHandler from '../../src/dom/event-handler'
3-
import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture'
4-
import { isRTL, noop } from '../../src/util/index'
5-
import Swipe from '../../src/util/swipe'
1+
import Carousel from '../../src/carousel.js'
2+
import EventHandler from '../../src/dom/event-handler.js'
3+
import { isRTL, noop } from '../../src/util/index.js'
4+
import Swipe from '../../src/util/swipe.js'
5+
import { clearFixture, createEvent, getFixture, jQueryMock } from '../helpers/fixture.js'
66

77
describe('Carousel', () => {
88
const { Simulator, PointerEvent } = window

0 commit comments

Comments
 (0)