From 1bbdfabd1da3c29ede8434e85c8b768b05765949 Mon Sep 17 00:00:00 2001 From: Anton Medvedev Date: Fri, 26 Jan 2018 00:35:55 +0700 Subject: [PATCH] Fix tests --- test.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test.sh b/test.sh index 7e3cf45..2c7274d 100755 --- a/test.sh +++ b/test.sh @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -euxo pipefail -alias fx='node index.js' -echo '[{"greeting": "hello world"}]' | fx -echo '{"key": "value"}' | fx "x => x.key" -echo '[1, 2, 3, 4, 5]' | fx "this.map(x => x * this.length)" -echo '[1, 2, 3, 4, 5]' | fx "for (let i of this) if (i % 2 == 0) yield i" -echo '{"items": ["foo", "bar"]}' | fx "this.items" "yield* this; yield 'baz'" +readonly fx='node index.js' + +echo '[{"greeting": "hello world"}]' | $fx +echo '{"key": "value"}' | $fx "x => x.key" +echo '[1, 2, 3, 4, 5]' | $fx "this.map(x => x * this.length)" +echo '[1, 2, 3, 4, 5]' | $fx "for (let i of this) if (i % 2 == 0) yield i" +echo '{"items": ["foo", "bar"]}' | $fx "this.items" "yield* this; yield 'baz'"