Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions e2e/ts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"esModuleInterop": true,
"module": "commonjs",
"strict": true,
"target": "es6"
}
}
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
},
roots: ['<rootDir>/src'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"prettier": "^3.0.0",
"ts-jest": "^29.1.0",
"typedoc": "^0.28.1",
"typescript": "^5.0.2",
"typescript": "^6.0.2",
"typescript-eslint": "^8.5.0"
},
"publishConfig": {
Expand Down
8 changes: 5 additions & 3 deletions src/webServiceClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ const auth = {
};

describe('WebServiceClient', () => {
afterEach(() => {
nock.cleanAll();
nock.abortPendingRequests();
});

const client = new Client(auth.user, auth.pass);

describe('city()', () => {
Expand Down Expand Up @@ -393,9 +398,6 @@ describe('WebServiceClient', () => {
});

describe('timeout handling', () => {
afterEach(() => {
nock.cleanAll();
});
it('should time out if the request takes too long', async () => {
const ip = '8.8.8.8';

Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"compilerOptions": {
"allowUnreachableCode": true,
"baseUrl": ".",
"allowJs": false,
"declaration": true,
"lib": ["es2015", "es2016", "es2017"],
"lib": ["es2022"],
"types": ["node"],
"module": "commonjs",
"outDir": "dist",
"pretty": true,
Expand Down
8 changes: 8 additions & 0 deletions tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"types": ["jest", "node"]
},
"include": ["src"],
"exclude": []
}
Loading