Skip to content

Commit

Permalink
Move to npm for command running
Browse files Browse the repository at this point in the history
  • Loading branch information
zackerydev committed Dec 28, 2023
1 parent 841296b commit 31db517
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 10,424 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ jobs:
${{ runner.os }}-node-${{matrix.node-version}}-
- run: npm ci
- run: npm run build
- run: npm test
- run: npm run lint
- run: npm run jest
- run: npm run examples
- run: npm run benchmarks
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@master
with:
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
if-present=true
9,604 changes: 0 additions & 9,604 deletions documentation/package-lock.json

This file was deleted.

17 changes: 12 additions & 5 deletions examples/benchmark/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
## Benchmark Results

### Usage

```
npm run benchmarks
```
|Type|Row Count|No. Runs|Avg|
|-|-|-|-|
|nonquoted|1000|5|6.2ms|
|nonquoted|10000|5|26.8ms|
|nonquoted|20000|5|47.4ms|
|nonquoted|50000|5|116.2ms|
|nonquoted|100000|5|226ms|
|quoted|1000|5|5ms|
|quoted|10000|5|34.4ms|
|quoted|20000|5|69.2ms|
|quoted|50000|5|172.8ms|
|quoted|100000|5|334.4ms|
4 changes: 2 additions & 2 deletions examples/example-runner/bin/run-examples
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const fs = require('fs');
const cp = require('child_process');
const path = require('path');
const globby = require('globby');
const diffDefault = require('jest-diff').default;
const { diff } = require('jest-diff');
const yargs = require('yargs');

const OUTPUT_REGEXP = new RegExp(`\\/\\/ Output: *${EOL}`);
Expand Down Expand Up @@ -44,7 +44,7 @@ const checkOutput = (exampleName, examples, exampleActualOutput) => {
throw new Error(`Example '${exampleName}' did not define expected output!`);
}
if (expected.trim() !== exampleActualOutput.trim()) {
throw new Error(`Example ${exampleName} failed!\n\n${diffDefault(expected, exampleActualOutput)}`);
throw new Error(`Example ${exampleName} failed!\n\n${diff(expected, exampleActualOutput)}`);
} else {
console.log(`Example ${exampleName} Output:\n\n${exampleActualOutput}\n\n`);
}
Expand Down
Loading

0 comments on commit 31db517

Please sign in to comment.