File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed
easydata.js/packs/core/test Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -95,4 +95,31 @@ describe("Functions", ()=> {
9595 utils . assignDeep ( object1 , object2 ) ;
9696 expect ( object1 . arr [ 0 ] . data . get ) . toEqual ( object2 . arr [ 0 ] . data . get ) ;
9797 } ) ;
98+
99+ it ( 'generateId test' , async ( ) => {
100+ const array = [ ]
101+
102+ const gen_pack = ( ) => {
103+ for ( let i = 0 ; i < 100 ; i ++ ) {
104+ array . push ( utils . generateId ( 'id' ) )
105+ }
106+ }
107+
108+ const delay = ( ms : number ) => {
109+ return new Promise ( ( resolve , reject ) => {
110+ setTimeout ( resolve , ms ) ;
111+ } ) ;
112+ }
113+
114+ gen_pack ( )
115+
116+ for ( let j = 0 ; j < 5 ; j ++ ) {
117+ await delay ( 1000 )
118+ gen_pack ( )
119+ }
120+
121+ const test = new Set ( array )
122+
123+ expect ( array . length ) . toEqual ( test . size )
124+ } , 20000 )
98125} ) ;
Original file line number Diff line number Diff line change 22cd .\EasyDataAspNetCoreTest01
33
44@ echo ---- installing NPM packages for EasyDataAspNetCoreTest01 ----
5- call npm install
5+ call npm install --legacy-peer-deps
66
77@ echo ---- setting symlinks to the @easydata source code ----
88cd node_modules
@@ -20,7 +20,7 @@ cd ..\..\..
2020cd .\EasyDataAspNetCoreTest02
2121
2222@ echo ---- installing NPM packages for EasyDataAspNetCoreTest02 ----
23- call npm install
23+ call npm install --legacy-peer-deps
2424
2525@ echo ---- setting symlinks to the @easydata source code ----
2626cd node_modules
You can’t perform that action at this time.
0 commit comments