Skip to content

Commit

Permalink
perf: every test uses one instance
Browse files Browse the repository at this point in the history
  • Loading branch information
star0202 committed Apr 5, 2023
1 parent 99e8180 commit ff7ad09
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
8 changes: 8 additions & 0 deletions tests/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Neis } from '../src'
import { Logger } from 'tslog'

export const logger = new Logger()

export const neis = new Neis({
logger: logger,
})
10 changes: 2 additions & 8 deletions tests/meal.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { MealInfo, Neis } from '../src'
import { Logger } from 'tslog'

const logger = new Logger()

const neis = new Neis({
logger: logger,
})
import type { MealInfo } from '../src/types'
import { logger, neis } from './index'

describe('Meal', () => {
it('should return MealInfo[]', async () => {
Expand Down
10 changes: 2 additions & 8 deletions tests/school.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { Neis, School } from '../src'
import { Logger } from 'tslog'

const logger = new Logger()

const neis = new Neis({
logger: logger,
})
import { logger, neis } from '.'
import type { School } from '../src'

describe('School', () => {
it('should return School[]', async () => {
Expand Down

0 comments on commit ff7ad09

Please sign in to comment.