From c4fa4c237c7a8f7303d06812c6afbd47b0fc4963 Mon Sep 17 00:00:00 2001 From: Chris Clark Date: Mon, 24 Aug 2015 16:58:50 -0700 Subject: [PATCH] Compile test cases to run tests without using Babel --- bin/ci.sh | 10 +++++++--- test/fixtures/api/rippled/account-tx.js | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/ci.sh b/bin/ci.sh index 99f060c6..8aa81738 100755 --- a/bin/ci.sh +++ b/bin/ci.sh @@ -24,9 +24,13 @@ unittest() { npm run coveralls # test compiled version in "dist/npm" - ln -nfs ../../dist/npm/core test/node_modules/ripple-lib - ln -nfs ../../dist/npm test/node_modules/ripple-api - npm test + babel -D --optional runtime --ignore "**/node_modules/**" -d test-compiled/ test/ + echo "--reporter spec --timeout 5000 --slow 500" > test-compiled/mocha.opts + mkdir -p test-compiled/node_modules + ln -nfs ../../dist/npm/core test-compiled/node_modules/ripple-lib + ln -nfs ../../dist/npm test-compiled/node_modules/ripple-api + mocha --opts test-compiled/mocha.opts test-compiled + rm -rf test-compiled } oneNode() { diff --git a/test/fixtures/api/rippled/account-tx.js b/test/fixtures/api/rippled/account-tx.js index da5addbb..156e51c2 100644 --- a/test/fixtures/api/rippled/account-tx.js +++ b/test/fixtures/api/rippled/account-tx.js @@ -3,7 +3,7 @@ const _ = require('lodash'); const hashes = require('../../hashes'); const addresses = require('../../addresses'); -const SerializedObject = require('../../../../src/core').SerializedObject; +const SerializedObject = require('ripple-lib').SerializedObject; const AccountSet = require('./tx/account-set.json'); const NotFound = require('./tx/not-found.json');