-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelpers.test.ts
37 lines (29 loc) · 976 Bytes
/
helpers.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import assert from 'node:assert'
import { after, describe, it } from 'node:test'
import { releaseAll } from '@cityssm/mssql-multi-pool'
import Debug from 'debug'
import { DEBUG_ENABLE_NAMESPACES } from '../debug.config.js'
import { getAccountNumberByWorkOrderNumberAndObjectCode } from '../index.js'
import {
accountNumberObjectCode,
accountNumberWorkOrderNumber,
mssqlConfig
} from './config.js'
Debug.enable(DEBUG_ENABLE_NAMESPACES)
await describe('helpers', async () => {
await describe('getAccountNumberByWorkOrderNumberAndObjectCode()', async () => {
after(async () => {
await releaseAll()
})
await it('Retrieves an account number', async () => {
const accountNumber =
await getAccountNumberByWorkOrderNumberAndObjectCode(
mssqlConfig,
accountNumberWorkOrderNumber,
accountNumberObjectCode
)
console.log(accountNumber)
assert.ok(accountNumber !== undefined)
})
})
})