Skip to content

Commit 448d339

Browse files
committed
set up unit tests
1 parent 9211a4f commit 448d339

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

scripts/setup.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ mkdir -p ${HIGHLIGHTJS_RASCRIPT}
1212
cp -r src ${HIGHLIGHTJS_RASCRIPT}
1313
cp -r test ${HIGHLIGHTJS_RASCRIPT}
1414
cd ${PLAYGROUND}
15-
npm ci
15+
npm ci
16+
node ./tools/build.js -t cdn

scripts/test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ if [ $? -ne 0 ]; then
1111
fi
1212

1313
cd ${PLAYGROUND}
14-
node ./tools/build.js -t cdn
1514
npm run build_and_test
1615
if [ $? -ne 0 ]; then
1716
exit 1
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<span class="hljs-keyword">function</span> <span class="hljs-title function_ invoke__">Test</span>(<span class="hljs-variable">var1</span>) {
2+
<span class="hljs-keyword">return</span> <span class="hljs-variable">var1</span> <span class="hljs-operator">+</span> <span class="hljs-number">2</span>
3+
}

test/markup/rascript/function.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
function Test(var1) {
2+
return var1 + 2
3+
}

0 commit comments

Comments
 (0)