File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11import Atbash from '../Atbash'
22
33describe ( 'Testing Atbash function' , ( ) => {
4- it ( 'Test - 1, passing the non-string as an argument' , ( ) => {
4+ it ( 'Test - 1, passing a non-string as an argument' , ( ) => {
55 expect ( ( ) => Atbash ( 0x345 ) ) . toThrow ( )
66 expect ( ( ) => Atbash ( 123 ) ) . toThrow ( )
77 expect ( ( ) => Atbash ( 123n ) ) . toThrow ( )
@@ -10,8 +10,9 @@ describe('Testing Atbash function', () => {
1010 expect ( ( ) => Atbash ( [ ] ) ) . toThrow ( )
1111 } )
1212
13- it ( 'Test - 2, passing all alphabets' , ( ) => {
14- expect ( Atbash ( 'HELLO WORLD' ) ) . toBe ( 'SVOOL DLIOW' )
15- expect ( Atbash ( 'The quick brown fox jumps over the lazy dog' ) ) . toBe ( 'Gsv jfrxp yildm ulc qfnkh levi gsv ozab wlt' )
13+ it ( 'Test - 2, passing a string as an argument' , ( ) => {
14+ const clearText = 'The quick brown fox jumps over the lazy dog'
15+ const cryptText = Atbash ( clearText )
16+ expect ( Atbash ( cryptText ) ) . toBe ( clearText )
1617 } )
1718} )
You can’t perform that action at this time.
0 commit comments