WebAssemblyOS / wasmos

OS primitives and shell for AssembyScript and WebAssembly
MIT License
42 stars 21 forks source link

Working on "wc" #120

Open arasevic opened 5 years ago

arasevic commented 5 years ago

only implementing with -l flag functionality initially

arasevic commented 5 years ago

How does the fixture file system for the test harness become readily available for each spec without explicitly importing it? Also, based off of the instructions in the README, I should be able to execute a single spec from inside the __tests__ directory. e.g. npx asp packages/ash/assembly/__tests__/wc.spec.ts should only run that single spec but it actually runs the entire suite. Given the current number of tests in the suite it's not a big deal but as the project grows it would be nice to be able to run an individual test file - not to mention when working on a new feature it would be nice to only see the tests related to what you are developing.

willemneal commented 5 years ago

1) It's in __test__/fixtures.ts. Since you import something from that file, it'sbeforeAllfunction is registered withas-pectwhich then imports the json string insimple_fs.ts`, parses it, and recursively adds each directory and file.

2) You're missing the file flag. npx asp -f wc or npx asp --file wc works for me locally. And the next feature is to be able to filter on test names too.

jtenner commented 5 years ago

Aspect is a brand new tool and a lot of the features we desperately need haven't been developed yet. I could use some help on the runtime branch to match test names using the --test and --group flags!