Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce automated (integration) tests for the node module #12

Merged
merged 30 commits into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ebdffad
feat: pre-processing of test requests
Varun0157 Jun 16, 2024
62012ad
feat: wrote basic skeleton of running requests in testing workflow
Varun0157 Jun 18, 2024
4390602
feat: created functionality to compare requests to obtained test results
Varun0157 Jun 18, 2024
ddf189d
feat: added captured variables, added error messages
Varun0157 Jun 18, 2024
300c421
test: updating jest config file to increase time-out, show console ou…
Varun0157 Jun 18, 2024
17c7c64
test: adding testing file
Varun0157 Jun 18, 2024
4cb19ae
refactor: cleaning up output
Varun0157 Jun 18, 2024
05066e3
test: removing skip clauses
Varun0157 Jun 18, 2024
1674567
feat: testing working, corrected expected number of tests
Varun0157 Jun 18, 2024
79f901a
test: added prettier check for tests dir
Varun0157 Jun 18, 2024
cc249b5
test: further increased timeout, renamed index testing file
Varun0157 Jun 18, 2024
d92c5ff
refactor: removing bundle printing in test run to reduce log output f…
Varun0157 Jun 18, 2024
b61b69e
refactor test: renaming recursive call in getNumTests
Varun0157 Jun 18, 2024
a8bffd1
test: moved auto-tests to the tests dir, from examples
Varun0157 Jun 18, 2024
5fc5921
refactor: reorganised headers
Varun0157 Jun 18, 2024
42c8e33
test: moving some variables to separate varfiles to test reading from…
Varun0157 Jun 18, 2024
0b68645
build: fixing security vulnerability by npm audit fix
Varun0157 Jun 18, 2024
fbb110f
feat: if name contains negative, expecting all to fail, else, expecti…
Varun0157 Jun 22, 2024
9454c3b
feat: removing file replacement as it is the responsibility of the ru…
Varun0157 Jun 22, 2024
5990462
feat: imrpoved recursive test formatting
Varun0157 Jun 22, 2024
1253f6e
bug: corrected test file
Varun0157 Jun 22, 2024
d93f83b
todo: adding instruction to introduce skipped in names
Varun0157 Jun 25, 2024
b713a9f
feat: introduce "multi" as a non-operator clause
Varun0157 Jun 26, 2024
a9c6586
chore: remove redundant bundlePath var
Varun0157 Jun 26, 2024
21e71f2
feat: introduce 'skip' clause in names to allow for all tests to be s…
Varun0157 Jun 26, 2024
25f7100
bug: corrected non-skipped tests collection
Varun0157 Jun 26, 2024
07c8da0
test: corrected test file to add skip clause testing
Varun0157 Jun 26, 2024
793b946
refactor: test file
Varun0157 Jun 26, 2024
9ca0e42
feat: returning number of failing requests instead of incrementing ex…
Varun0157 Jun 26, 2024
1e30024
refactor, chore: removed redundant test, refactored w/ prettier
Varun0157 Jun 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
with:
node-version: "20"
- name: prettier check
run: npx prettier -c ./src --config ./src/.prettierrc
run: npx prettier -c ./src ./tests --config ./.prettierrc
File renamed without changes.
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
silent: false,
testTimeout: 120*1000,
};
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export {
GotRequest,
TestResult,
SpecResult,
Tests,
} from "./models";

export { getRequestPositions, getAllRequestSpecs, getRequestSpec } from "./parseBundle";
Expand Down
9 changes: 9 additions & 0 deletions tests/bundles/auto-test.zzv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# to ensure that the module is reading from varfiles, we put some essential
# variables in the varfiles

default:
getUrl: /get
fooVar: bar
random:
getUrl: /random
fooVar: random
Loading
Loading