File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,16 @@ export async function run() {
1515  const  sequelize  =  createSequelize6Instance ( { 
1616    logQueryParameters : true , 
1717    benchmark : true , 
18-     define : { 
19-       // For less clutter in the SSCCE 
20-       timestamps : false , 
21-     } , 
2218  } ) ; 
2319
2420  class  Foo  extends  Model  { } 
2521
2622  Foo . init ( { 
27-     name : DataTypes . TEXT , 
23+     id : { 
24+       type : DataTypes . UUID , 
25+       defaultValue : DataTypes . UUIDV4 , 
26+       primaryKey : true 
27+     } , 
2828  } ,  { 
2929    sequelize, 
3030    modelName : 'Foo' , 
@@ -36,6 +36,9 @@ export async function run() {
3636  await  sequelize . sync ( {  force : true  } ) ; 
3737  expect ( spy ) . to . have . been . called ; 
3838
39-   console . log ( await  Foo . create ( {  name : 'TS foo'  } ) ) ; 
39+   expect ( Foo . bulkCreate ( 
40+     [ {  id : 'e8388762-1daa-11ef-b9f0-b7d47c40e7e3'  } ] , 
41+     {  updateOnDuplicate : [ 'createdAt' ]  } 
42+   ) ) . to . not . be . rejected ; 
4043  expect ( await  Foo . count ( ) ) . to . equal ( 1 ) ; 
4144} 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments