|
|
@@ -16,9 +16,11 @@ describe( 'utils', () => {
|
|
|
expect( id2 ).to.be.a( 'string' ).to.not.equal( id1 ).to.not.equal( id3 );
|
|
|
expect( id3 ).to.be.a( 'string' ).to.not.equal( id1 ).to.not.equal( id2 );
|
|
|
|
|
|
- expect( id1 ).to.match( /^[a-z][a-z0-9]{32}$/ );
|
|
|
- expect( id2 ).to.match( /^[a-z][a-z0-9]{32}$/ );
|
|
|
- expect( id3 ).to.match( /^[a-z][a-z0-9]{32}$/ );
|
|
|
+ const uuidRegex = /^e[a-f0-9]{32}$/;
|
|
|
+
|
|
|
+ expect( id1 ).to.match( uuidRegex );
|
|
|
+ expect( id2 ).to.match( uuidRegex );
|
|
|
+ expect( id3 ).to.match( uuidRegex );
|
|
|
} );
|
|
|
} );
|
|
|
} );
|