-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configuration to debug with VSCode
minor fixes from eslint and yarn.lock
- Loading branch information
Showing
8 changed files
with
495 additions
and
553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,3 @@ | |
/index.d.ts | ||
/yarn-error.log | ||
package-lock.json | ||
|
||
# IDE artifacts | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug Jest Tests", | ||
"type": "node", | ||
"preLaunchTask": "start-containers", | ||
"request": "launch", | ||
"runtimeArgs": [ | ||
"--inspect-brk", | ||
"${workspaceRoot}/node_modules/.bin/jest", | ||
"--runInBand", | ||
"--detectOpenHandles" | ||
], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "start-containers", | ||
"type": "shell", | ||
"command": "${workspaceRoot}/test.sh", | ||
"args": ["-oc"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
import ContextProvider from "../testContext"; | ||
import ContextProvider from '../testContext'; | ||
|
||
const context = ContextProvider.Instance; | ||
|
||
describe('Ensure creation of a currency', () => { | ||
|
||
it('should be able to create a currency', async () => { | ||
|
||
const trx = await context.conn?.transaction()!; | ||
|
||
const currency = await context.models?.currency.create({ | ||
code: 'TST' | ||
}, {trx}) | ||
|
||
expect(currency).toBeDefined(); | ||
expect(currency?.id).toBeDefined(); | ||
expect(currency?.code).toEqual('TST'); | ||
|
||
context.transactions = { | ||
...context.transactions, | ||
'create_currency': trx | ||
} | ||
|
||
}) | ||
}) | ||
it('should be able to create a currency', async () => { | ||
if (!context.conn) { | ||
throw new Error('Context connection is not defined'); | ||
} | ||
|
||
const trx = await context.conn.transaction(); | ||
|
||
const currency = await context.models?.currency.create( | ||
{ | ||
code: 'TST', | ||
}, | ||
{ trx } | ||
); | ||
|
||
expect(currency).toBeDefined(); | ||
expect(currency?.id).toBeDefined(); | ||
expect(currency?.code).toEqual('TST'); | ||
|
||
context.transactions = { | ||
...context.transactions, | ||
create_currency: trx, | ||
}; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ afterEach(async () => { | |
await trx[key]?.rollback(); | ||
} | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.