measur-tools-suite 1.0.13-beta.119 → 1.0.13-beta.120

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -164,17 +164,40 @@ To make it easy for developers local building and testing, it is dockerized. To
164
164
  ```bash
165
165
  docker compose down
166
166
  ```
167
- - To run the unit tests (both WASM and C++):
168
- - WASM: In a browser, launch [http://localhost:3000/](http://localhost:3000/)
169
- - C++: Run the following commands in order:
167
+ - To run the wasm tests locally on the host computer after build completes in the docker container, stop the container.
168
+ - Run the following two commands from the root directory of the repository:
169
+ ```bash
170
+ npm install
171
+
172
+ npm run test:browser
173
+ or
174
+ npm run tests
175
+ ```
176
+ > [!NOTE] If changes are made to any of the wasm test files, docker container does not have to be started or running, or the build in the docker container does not need to be rerun. The updated tests will run with the last successful build.
177
+
178
+
179
+ - To run the unit tests inside the container (both WASM and C++):
180
+ - Run the following command to enter the container bash:
170
181
  ```bash
171
182
  docker exec -it measur-tools-suite-build /bin/bash
172
183
  ```
184
+ - For WASM:
185
+ ```bash
186
+ cd /home/MEASUR-Tools-Suite/
187
+ ```
188
+ ```bash
189
+ npm run tests
190
+ ```
191
+ - For C++:
192
+ ```bash
193
+ cd /home/MEASUR-Tools-Suite/build-cpp/bin/
194
+ ```
195
+ ```bash
196
+ ./cpp_tests
197
+ ```
198
+ - To exit the container bash run:
173
199
  ```bash
174
- cd /usr/src/app/build-cpp/bin
175
- ```
176
- ```bash
177
- ./cpp_tests
200
+ exit
178
201
  ```
179
202
 
180
203
  > [!NOTE]
package/bin/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "measur-tools-suite",
3
- "version": "1.0.13-beta.119",
3
+ "version": "1.0.13-beta.120",
4
4
  "engines": {
5
5
  "node": "20.19.4",
6
6
  "npm": "10.8.2"
7
7
  },
8
8
  "scripts": {
9
- "test:browser": "karma start"
9
+ "test:browser": "karma start",
10
+ "tests": "npx karma start --browsers ChromeHeadlessNoSandbox --auto-watch false"
10
11
  },
11
12
  "description": "Calculation library for the Department of Energy Advanced Manufacturing and Materials Technologies Office and the Industrial Efficiency & Decarbonization Office (DOE AMMTO IEDO) suite of tools",
12
13
  "author": "Gina Accawi <accawigk@ornl.gov>",
package/karma.conf.js CHANGED
@@ -1,5 +1,12 @@
1
1
  module.exports = function (config) {
2
2
  config.set({
3
+ port: 3000,
4
+ customLaunchers: {
5
+ ChromeHeadlessNoSandbox: {
6
+ base: 'ChromeHeadless',
7
+ flags: ['--no-sandbox']
8
+ }
9
+ },
3
10
  frameworks: ['mocha'],
4
11
  files: [
5
12
  // All browser-based WASM Mocha tests
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "measur-tools-suite",
3
- "version": "1.0.13-beta.119",
3
+ "version": "1.0.13-beta.120",
4
4
  "engines": {
5
5
  "node": "20.19.4",
6
6
  "npm": "10.8.2"
7
7
  },
8
8
  "scripts": {
9
- "test:browser": "karma start"
9
+ "test:browser": "karma start",
10
+ "tests": "npx karma start --browsers ChromeHeadlessNoSandbox --auto-watch false"
10
11
  },
11
12
  "description": "Calculation library for the Department of Energy Advanced Manufacturing and Materials Technologies Office and the Industrial Efficiency & Decarbonization Office (DOE AMMTO IEDO) suite of tools",
12
13
  "author": "Gina Accawi <accawigk@ornl.gov>",