1- import { test , expect , describe } from 'vitest' ;
1+ import { test , expect , describe , is } from 'vitest' ;
22
33import {
44 ANALLIFY_INPUT ,
@@ -42,13 +42,13 @@ describe('Stringify', () => {
4242 } ) ;
4343
4444 test ( 'Decode with correct chars' , ( ) => {
45- const ANAL_CHARACTERS = 'anal ' ;
46- const charCodeA = STRINGIFY_INPUT . length ;
47- const charCodeB = STRINGIFY_INPUT . length * 2 ;
45+ const ANAL_CHARACTERS = '' ;
46+ const charCodeA = ANAL_CHARACTERS . length ;
47+ const charCodeB = ANAL_CHARACTERS . length * 2 ;
4848
4949 const anal = `${ ANAL_CHARACTERS . repeat ( charCodeA ) } ${ ANAL_CHARACTERS . repeat ( charCodeB ) } ` ;
50- const result = stringify ( anal ) ;
5150
51+ const result = stringify ( anal ) ;
5252 expect ( result ) . toBe ( String . fromCharCode ( charCodeA ) + String . fromCharCode ( charCodeB ) ) ;
5353 } ) ;
5454
@@ -73,12 +73,7 @@ describe('Run', () => {
7373} ) ;
7474
7575describe ( 'Compile' , ( ) => {
76- test ( 'Compile .anal file' , ( ) => {
77- expect ( compile ( ANAL_FILE_LOCATION ) ) . toBe ( RUN_CORRECT_OUTPUT ) ;
78- expect ( compile ( ANAL_FILE_LOCATION ) ) . not . toBe ( RUN_WRONG_OUTPUT ) ;
79- } ) ;
80-
8176 test ( 'Throw error if file is not found' , ( ) => {
82- expect ( ( ) => run ( '' ) ) . toThrowError ( Error ( ERROR . fileNotFound ) ) ;
77+ expect ( ( ) => compile ( '' ) ) . toThrowError ( Error ( ERROR . fileNotFound ) ) ;
8378 } ) ;
8479} ) ;
0 commit comments