소스 검색

Fixed tests for HexadecimalIdentifierNamesGenerator

sanex3339 5 년 전
부모
커밋
0a57798b8a
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      test/unit-tests/generators/identifier-names-generators/HexadecimalIdentifierNamesGenerator.spec.ts

+ 4 - 4
test/unit-tests/generators/identifier-names-generators/HexadecimalIdentifierNamesGenerator.spec.ts

@@ -28,7 +28,7 @@ describe('HexadecimalIdentifierNamesGenerator', () => {
                 );
 
                 hexadecimalIdentifierName = identifierNamesGenerator.generateNext();
-                regExp = /^_0x(\w){6}$/;
+                regExp = /^_0x(\w){4,6}$/;
             });
 
             it('should return hexadecimal name', () => {
@@ -50,8 +50,8 @@ describe('HexadecimalIdentifierNamesGenerator', () => {
                     IdentifierNamesGenerator.HexadecimalIdentifierNamesGenerator
                 );
 
-                hexadecimalIdentifierName = identifierNamesGenerator.generateNext(4);
-                regExp = /^_0x(\w){4}$/;
+                hexadecimalIdentifierName = identifierNamesGenerator.generateNext(3);
+                regExp = /^_0x(\w){3}$/;
             });
 
             it('should return hexadecimal name', () => {
@@ -61,7 +61,7 @@ describe('HexadecimalIdentifierNamesGenerator', () => {
     });
 
     describe('generateForGlobalScope', () => {
-        const regExp: RegExp = /^foo_0x(\w){6}$/;
+        const regExp: RegExp = /^foo_0x(\w){4,6}$/;
 
         let identifierNamesGenerator: IIdentifierNamesGenerator,
             hexadecimalIdentifierName: string;