-
-
Notifications
You must be signed in to change notification settings - Fork 93
[WIP] Move to Mocha tests #320
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
Draft
harryadel
wants to merge
43
commits into
master
Choose a base branch
from
mocha-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
e32607b
Move from tinytest to mocha
harryadel 2d09e8b
Re-add old insert_both.test.js
harryadel 0fa6578
Get insert local collections tests to pass
harryadel ee08a51
Fix insert_both tests
harryadel aef0e4f
fix remove_both
harryadel 947001a
Split find_findone_userid.test.js into two files
harryadel 991a9fc
Remove packages directory from .gitignore
harryadel 242823b
Track package code
harryadel ebed9df
track .meteor/packages
harryadel 182e9be
Revert collecion-hooks changes
harryadel 9f61cfb
Fix find and findOne tests
harryadel b6e1436
Fix insert_local.test.js
harryadel fa7f58d
Remove console.log from getUserId
harryadel 83ed694
Add publish.test.js
harryadel 9cbafa2
Fix CI file
harryadel 8c2299f
Update linting scripts in package.json to target tests-app directory
harryadel 1b034c7
Remove unnecessary user count assertion from find_users test
harryadel bfd607f
Update GitHub Actions workflow to use Meteor version 3.3 only
harryadel f27a3bb
Add package types entry and update version to 2.1.0-beta.1 in meteor-…
harryadel 32279e3
Remove tinytest
harryadel 4dde3b5
Remove dburles:mongo-collection-instances
harryadel b61aab0
Update version to 2.1.0-beta.2 and adjust supported Meteor versions i…
harryadel fcca86b
Revert .find hook changes
harryadel 25177ff
Update version to 2.1.0-beta.3 in meteor-collection-hooks and adjust …
harryadel e48b062
Comment out find hooks tests in find_users.test.js and remove find co…
harryadel bb85f4d
Integrate lai:collection-extensions
harryadel 82677cd
Refactor method references in collection hooks to use `originalMethod…
harryadel 0f3d85d
Add a helper function to determine when to bypass hooks in collection…
harryadel ba49bc4
Refactor collection hooks setup by modularizing functionality into de…
harryadel 0e105f2
Add createHookController function to modularize hook management, enab…
harryadel 6745a1f
Refactor collection hooks to use constants for property names
harryadel c1614fa
Update History.md
harryadel 21b7aed
Update README.md to reflect Meteor 3 compatibility, async hook suppor…
harryadel a441257
Enhance TypeScript definitions for collection hooks
harryadel 62d3c10
Remove outdated note on find/findOne hooks support from History.md
harryadel 8d1fad9
Update find_userid.test.js to use async methods for find hooks in Met…
harryadel 1b03c75
Update linting scripts in package.json to target 'packages' directory…
harryadel 1405e2c
Run tools:lintfix
harryadel 500f1e3
Fix lint problems
harryadel 7259441
Fix lint errors in find_users.test.js
harryadel 35b3a65
Add /* eslint-disable no-unused-vars / to the top of publish.test.js
harryadel 4c95daf
Publish a new beta
harryadel 92149ba
Set a version for lai:collection-extensions
harryadel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,32 @@ | ||
| # the test suite runs the tests (headless, server+client) for multiple Meteor releases | ||
| # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
|
||
| name: Test suite | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| test: | ||
| tests: | ||
| name: tests | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| meteorRelease: | ||
| - '--release 3.0.4' | ||
| - '--release 3.1' | ||
| meteor: [ '3.3' ] | ||
| # needs: [lintcode,lintstyle,lintdocs] # we could add prior jobs for linting, if desired | ||
| steps: | ||
| - name: Checkout code | ||
| - name: checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Node.js | ||
| uses: actions/setup-node@v4 | ||
| - name: Setup meteor | ||
| uses: meteorengineer/setup-meteor@v2 | ||
| with: | ||
| node-version: '20.x' | ||
| meteor-release: ${{ matrix.meteor }} | ||
|
|
||
| - name: Install Dependencies | ||
| run: | | ||
| curl https://install.meteor.com | /bin/sh | ||
| npm i -g @zodern/mtest | ||
| - name: Run Tests | ||
| run: | | ||
| mtest --package ./ --once ${{ matrix.meteorRelease }} | ||
| - name: cache dependencies | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.npm | ||
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-node- | ||
| - run: cd tests-app && meteor npm install && meteor npm run test | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| .DS_Store | ||
| Thumbs.db | ||
| packages | ||
| *~ | ||
| versions.json | ||
| .versions | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium test
Copilot Autofix
AI 4 months ago
To fix the issue, we will add a
permissionsblock at the root of the workflow. This block will apply to all jobs in the workflow unless overridden by a job-specificpermissionsblock. Since the workflow only needs to read repository contents (e.g., for checking out code), we will setcontents: readas the minimal required permission.