Commit 4675b60

Anton Medvedev <anton@medv.io>
2021-05-08 16:50:01
Improve test.mjs
1 parent ae1aa26
Changed files (1)
test.mjs
@@ -12,13 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-function assert(cond, msg) {
-  if (cond) return
-  console.error('Assertion failed')
-  if (msg) console.error(msg)
-  process.exit(1)
-
-}
+import {strict as assert} from 'assert'
 
 {
   let hello = await $`echo Error >&2; echo Hello`
@@ -73,3 +67,5 @@ function assert(cond, msg) {
   process.env.FOO = 'hi; exit 1'
   await $`echo $FOO`
 }
+
+console.log(chalk.green('🍺 Success!'))