Skip to content

Commit

Permalink
refactor: relocate tests directory and update code
Browse files Browse the repository at this point in the history
  • Loading branch information
kiki-kanri committed Nov 21, 2023
1 parent 345848d commit f8d42b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
],
"scripts": {
"build": "ts-project-builder -c --type package",
"dev": "tsx watch ./src/dev.ts"
"test": "tsx ./tests/index.ts",
"test:watch": "tsx watch ./tests/index.ts"
},
"dependencies": {
"type-fest": "^4.8.1"
Expand Down
3 changes: 1 addition & 2 deletions src/tests/aes.ts → tests/aes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const runAESTest = () => {
consola.info(`Key 128: ${key128}`);
consola.info(`Key 192: ${key192}`);
consola.info(`Key 256: ${key256}`);
console.log();
// prettier-ignore
const tests = [
[runCipherTest, AESCipher.CBC],
Expand All @@ -29,9 +28,9 @@ export const runAESTest = () => {

// prettier-ignore
tests.forEach(([func, cipherClass]) => {
console.log();
// @ts-ignore
func(cipherClass);
console.log();
});
};

Expand Down
2 changes: 1 addition & 1 deletion src/dev.ts → tests/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { runAESTest } from '@/tests/aes';
import { runAESTest } from './aes';

function main() {
runAESTest();
Expand Down

0 comments on commit f8d42b5

Please sign in to comment.