File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ describe('urlsafe_b64encode', () => {
66 expect ( urlsafe_b64encode ( 'hello+foo/bar=====' ) ) . toBe ( 'aGVsbG8rZm9vL2Jhcj09PT09' ) ;
77 } ) ;
88 it ( 'multiple + characters should be encoded correctly -' , ( ) => {
9- let inp = 'const is_greater_than_1 = 45 >= 5 ? true : false\nconst is_greater_than_2 = 6435 >= 5 ? true : false' ;
10- let expected = 'Y29uc3QgaXNfZ3JlYXRlcl90aGFuXzEgPSA0NSA-PSA1ID8gdHJ1ZSA6IGZhbHNlCmNvbnN0IGlzX2dyZWF0ZXJfdGhhbl8yID0gNjQzNSA-PSA1ID8gdHJ1ZSA6IGZhbHNl'
9+ const inp = 'const is_greater_than_1 = 45 >= 5 ? true : false\nconst is_greater_than_2 = 6435 >= 5 ? true : false' ;
10+ const expected = 'Y29uc3QgaXNfZ3JlYXRlcl90aGFuXzEgPSA0NSA-PSA1ID8gdHJ1ZSA6IGZhbHNlCmNvbnN0IGlzX2dyZWF0ZXJfdGhhbl8yID0gNjQzNSA-PSA1ID8gdHJ1ZSA6IGZhbHNl'
1111 expect ( urlsafe_b64encode ( inp ) ) . toBe ( expected ) ;
1212 } ) ;
1313 it ( 'multiple / characters should be encoded correctly as _' , ( ) => {
14- let inp = 'const has_env1 = window.env1 ? true : false;\nconst has_env2 = window.env2 ? true : false;' ;
15- let expected = 'Y29uc3QgaGFzX2VudjEgPSB3aW5kb3cuZW52MSA_IHRydWUgOiBmYWxzZTsKY29uc3QgaGFzX2VudjIgPSB3aW5kb3cuZW52MiA_IHRydWUgOiBmYWxzZTs'
14+ const inp = 'const has_env1 = window.env1 ? true : false;\nconst has_env2 = window.env2 ? true : false;' ;
15+ const expected = 'Y29uc3QgaGFzX2VudjEgPSB3aW5kb3cuZW52MSA_IHRydWUgOiBmYWxzZTsKY29uc3QgaGFzX2VudjIgPSB3aW5kb3cuZW52MiA_IHRydWUgOiBmYWxzZTs'
1616 expect ( urlsafe_b64encode ( inp ) ) . toBe ( expected ) ;
1717 } ) ;
1818} ) ;
You can’t perform that action at this time.
0 commit comments