Skip to content

Commit

Permalink
Update sscce-sequelize-6.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ron-dadon authored Aug 22, 2024
1 parent 2bc4eaf commit c547c3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sscce-sequelize-6.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ export async function run() {
},
});

class Foo extends Model {}
class Bar extends Model {}

Foo.init({
Bar.init({
name: DataTypes.STRING,
}, {
sequelize,
modelName: 'Foo',
modelName: 'Bar',
});

// You can use sinon and chai assertions directly in your SSCCE.
Expand All @@ -44,7 +44,7 @@ export async function run() {
nonTransactionCb.resetHistory();
}

const afterSaveFooHook = (instance: Foo, options: any) => {
const afterSaveFooHook = (instance: Bar, options: any) => {
if (options.transaction) {
options.transaction.afterCommit(() => afterCommitCb());
return;
Expand Down

0 comments on commit c547c3b

Please sign in to comment.