From c755287ba845c4cbbf1d50e5aafecb2e687c7ac9 Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Thu, 3 May 2018 18:03:22 +0200 Subject: js: Added browser testing for unit tests -- * Added unittests to be run inside a Browser. To be able to access the non-exposed functions and classes, a testing bundle will be created, containing the tests (unittests.js) and the items to be tested. * src/Helpelpers, src/Key, src/Keyring: fixed some errors found during testing. --- lang/js/build_extensions.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lang/js/build_extensions.sh') diff --git a/lang/js/build_extensions.sh b/lang/js/build_extensions.sh index b99a362c..91d5479b 100755 --- a/lang/js/build_extensions.sh +++ b/lang/js/build_extensions.sh @@ -1,11 +1,13 @@ #/!bin/bash npx webpack --config webpack.conf.js +npx webpack --config webpack.conf_unittests.js mkdir -p BrowserTestExtension/libs cp node_modules/chai/chai.js \ node_modules/mocha/mocha.css \ node_modules/mocha/mocha.js \ - build/gpgmejs.bundle.js BrowserTestExtension/libs + build/gpgmejs.bundle.js \ + build/gpgmejs_unittests.bundle.js BrowserTestExtension/libs rm -rf build/extensions mkdir -p build/extensions zip -r build/extensions/browsertest.zip BrowserTestExtension -- cgit v1.2.3