20 Commits

Author SHA1 Message Date
Nate Fischer
1a31356343 refactor: use require instead of import
No change to logic. This swaps over tests to use require() since
everything is currently designed for the commonjs module system.
2025-04-07 22:44:24 -07:00
Nate Fischer
2ee83ebf74 refactor(test): update AVA and refactor tests (#760)
This updates tests for `AVA` 19.0.0+.

`AVA` 0.18.0 has a breaking change which changes the current working directory
for tests. As a result, we need to change 'resources' -> 'test/resources' (and
 similar path changes).

`AVA` 0.19.0 has a breaking change that all tests must run at least one assert.
This breaking change was already resolved by #746, so no change was necessary in
this PR.

This updates to `AVA` 0.21.0, since there are no other breaking changes.
2017-08-11 11:03:13 -07:00
Nate Fischer
38b57c8942 chore: add skipOnWin and skipOnUnix test helpers (#746)
This adds `skipOnWin` and `skipOnUnix` to help us manage our platform-dependent
tests. These methods give a nice warning message when we skip tests. We may also
consider adding warnings when running platform-dependent tests.

Part of the motivation for this is if we ever update to AVA v0.19. This version
requires at least one assertion per test case. While this could be disabled with
an AVA setting, we instead benefit from warnings for any case when we
unintentionally skip assertions.

This adds chalk as a dev dependency to enable colored messages.
2017-06-18 11:51:01 -07:00
Brandon Freitag
e12da9d888 Refactor: Use process.platform across codebase (#689)
* Use process.platform across codebase

* Use process.platform in tests
2017-04-14 23:04:21 -07:00
Brandon Freitag
7fa4b995bf Finalize moving to ava (#630)
* Move ava-test/ directory to test/

* Remove unnecessary run-tests.js script

* Run only ava during npm test script
2016-12-20 11:27:02 -08:00
Nate Fischer
40273b73c4 test: refactor 'test' command tests to AVA (#612) 2016-12-08 22:10:58 -08:00
Gyandeep Singh
9bf98dece9 Fix: Remove default glob from shell.test (fixes #529) (#530) 2016-10-17 11:00:04 -07:00
Nate Fischer
2395214fee chore: switch to eslint (#504)
* chore: switch to eslint

* fix: works on older versions of NodeJS now

* chore: fix curly braces

* chore: fix indents and remove jshint references
2016-08-07 12:16:29 -07:00
Nate Fischer
3a7eb3f2ad feat(glob): glob support for (almost) all commands 2016-02-13 21:22:48 -08:00
Burak Yigit Kaya
175f5e1efd Fix tests on Windows 2016-01-27 22:53:31 +02:00
Artur Adib
193968a978 remove old shims 2013-09-21 10:19:38 -04:00
Li Ge
38f1d6d9c4 If a symbolic link is broken, test('-L', badlink) should still return true.
While test('-L', 404) should return false.
2013-03-21 01:33:02 -07:00
Artur Adib
ef795af7e4 adding jshint to tests; all tests pass 2012-12-27 16:32:31 -05:00
Artur Adib
e4d9dabe52 introducing config.silent, config.fatal
deprecates silent()
2012-12-01 09:48:23 -05:00
James Campos
57bdc55f01 only lstat on -L 2012-09-12 10:08:42 -07:00
James Campos
0b624342a7 add test for non-existant file 2012-09-12 07:42:21 -07:00
James Campos
1e7a0b9a8d rm tests for block, character, fifo files 2012-09-12 07:41:38 -07:00
James Campos
8a46ec6c83 add test tests (causes mv tests to fail 2012-09-08 19:14:35 -07:00
Artur Adib
11614fd516 Deprecated: verbose() and exists() 2012-03-15 14:20:10 -04:00
Artur Adib
c2ab790cde simple test() 2012-03-14 15:57:39 -04:00