()
| 4 | export const sequelize = new Sequelize(class="st">'uri'); |
| 5 | |
| 6 | async function trans() { |
| 7 | const a: number = await sequelize.transaction(async transaction => { |
| 8 | transaction.afterCommit(() => console.log(class="st">'transaction complete')); |
| 9 | User.create( |
| 10 | { |
| 11 | firstName: class="st">'John', |
| 12 | }, |
| 13 | { |
| 14 | transaction, |
| 15 | } |
| 16 | ); |
| 17 | return 1; |
| 18 | }); |
| 19 | } |
| 20 | |
| 21 | async function trans2() { |
| 22 | return await sequelize.transaction(async transaction => { |
nothing calls this directly
no test coverage detected