Skip to content

Commit

Permalink
updating jest setup
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreardon committed May 22, 2024
1 parent c4a247c commit 11d5a3d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('jest').Config} */
module.exports = {
const config = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
// setupFiles: ['./test/env-setup.ts'],
Expand All @@ -8,3 +8,4 @@ module.exports = {
// testPathIgnorePatterns: ['/node_modules/', '/cypress/'],
modulePathIgnorePatterns: ['/dist/'],
};
export default config;
2 changes: 1 addition & 1 deletion test/bind-event-listener/bind-all.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { bindAll, UnbindFn } from '../../src';
import { bindAll, type UnbindFn } from '../../src';

Check failure on line 1 in test/bind-event-listener/bind-all.spec.ts

View workflow job for this annotation

GitHub Actions / validate

Cannot find module '../../src'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?

it('should allow for multiple bindings of different types', () => {
const button: HTMLElement = document.createElement('button');
Expand Down
2 changes: 1 addition & 1 deletion test/bind-event-listener/bind.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UnbindFn } from '../../src/types';
import type { UnbindFn } from '../../src/types';
import { bind } from '../../src';

Check failure on line 2 in test/bind-event-listener/bind.spec.ts

View workflow job for this annotation

GitHub Actions / validate

Cannot find module '../../src'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?

it('should bind a listener', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/type-tests/public-types-object-listener-test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expectTypeOf } from 'expect-type';
import { Binding, Listener } from '../../src';
import type { Binding, Listener } from '../../src';
import { expectType, TypeOf } from 'ts-expect';

// extracting event type
Expand Down

0 comments on commit 11d5a3d

Please sign in to comment.