File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
import Atbash from '../Atbash'
2
2
3
3
describe ( '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' , ( ) => {
5
5
expect ( ( ) => Atbash ( 0x345 ) ) . toThrow ( )
6
6
expect ( ( ) => Atbash ( 123 ) ) . toThrow ( )
7
7
expect ( ( ) => Atbash ( 123n ) ) . toThrow ( )
@@ -10,8 +10,9 @@ describe('Testing Atbash function', () => {
10
10
expect ( ( ) => Atbash ( [ ] ) ) . toThrow ( )
11
11
} )
12
12
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 )
16
17
} )
17
18
} )
You can’t perform that action at this time.
0 commit comments