Skip to content

Commit

Permalink
Remove esModuleInterop and fix assert import in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzRabbs authored and ItzRabbs committed May 30, 2022
1 parent e1fe1d2 commit 9ccf0cf
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/UnauthorizedError.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UnauthorizedError } from '../src/errors/UnauthorizedError';
import assert from 'assert';
import * as assert from 'assert';

describe('Unauthorized Error', () => {
const e = new UnauthorizedError('credentials_bad_format', new Error('a'));
Expand Down
2 changes: 1 addition & 1 deletion test/jwt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as jwt from 'jsonwebtoken';
import * as express from 'express';
import { expressjwt, UnauthorizedError, ExpressJwtRequest, GetVerificationKey } from '../src';
import assert from 'assert';
import * as assert from 'assert';


describe('failure tests', function () {
Expand Down
2 changes: 1 addition & 1 deletion test/multitenancy.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as jwt from 'jsonwebtoken';
import * as express from 'express';
import { expressjwt, ExpressJwtRequest, GetVerificationKey } from '../src';
import assert from 'assert';
import * as assert from 'assert';

describe('multitenancy', function () {
const req = {} as ExpressJwtRequest;
Expand Down
2 changes: 1 addition & 1 deletion test/revocation.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as jwt from 'jsonwebtoken';
import * as express from 'express';
import { expressjwt, ExpressJwtRequest } from '../src';
import assert from 'assert';
import * as assert from 'assert';

describe('revoked jwts', function () {
const secret = 'shhhhhh';
Expand Down
2 changes: 1 addition & 1 deletion test/string_token.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as jwt from 'jsonwebtoken';
import * as express from 'express';
import { expressjwt, ExpressJwtRequest } from '../src';
import assert from 'assert';
import * as assert from 'assert';


describe('string tokens', function () {
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
"outDir": "./dist",
"allowJs": true,
"target": "es5",
"esModuleInterop": true,
"declaration": true
},
"include": [
"./src/**/*"
]
}
}

0 comments on commit 9ccf0cf

Please sign in to comment.