UNPKG
jupyter-js-auto-test
Version:
latest (1.2.0)
1.2.0
1.1.0
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Auto scan files under the directory and run test in them
jupyter-js-auto-test
/
testfile1.js
15 lines
(13 loc)
•
332 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const
chalk =
require
(
'chalk'
)
module
.
exports
= { foo }
function
foo
(
callback
) {
if
(
1
+
1
===
2
) {
console
.
log
(chalk.
green
(
'Test foo passed'
))
callback
(
true
) }
else
{
console
.
log
(chalk.
red
(
'Test foo failed due to '
),
'impossible'
)
callback
(
false
,
'error message'
) } }