Skip to content

Commit

Permalink
chore: change folder structure and simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
serkonda7 committed Jan 5, 2024
1 parent d6d2866 commit 1f559ca
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
root = true

[*.bt]
indent_style = tab
indent_size = 4
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
node-version: '16'
- uses: tiabeast/setup-bait@main
- name: Run tests
run: bait test tasks
run: bait test .
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 3 additions & 15 deletions tasks/tasks_test.bt → tasks_test.bt
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
import os
import bait.util.testing

const ROOT_DIRS := [
'hello_world',
'loops'
]

const DIRS := [
'100_doors',
]
const TASKS_DIR := os.join_path(os.dir($FILE), ['tasks'])
const ROOT_DIRS := os.ls(TASKS_DIR)

fun run_task_tests(opts string) {
mut runner := testing.InOutRunner{
check_stdout = true
cmd_options = opts
}

tasks_dir := os.dir($FILE)

for rd in ROOT_DIRS {
runner.root = os.join_path(tasks_dir, [rd])
runner.root = os.join_path(TASKS_DIR, [rd])
runner.test_all_in_root()
}
runner.root = tasks_dir
for d in DIRS {
runner.test_dir(d)
}
}

fun test_tasks_js() {
Expand Down

0 comments on commit 1f559ca

Please sign in to comment.