Skip to content

Commit

Permalink
Use collection-instances to ensure collections are not re-created
Browse files Browse the repository at this point in the history
  • Loading branch information
harryadel committed Sep 23, 2024
1 parent 2ecf8ac commit 5761671
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Package.onTest(function (api) {
'tinytest',
'test-helpers',
'ecmascript',
'jquery'
'jquery',
'dburles:mongo-collection-instances'
])

api.mainModule('tests/client/main.js', 'client')
Expand Down
3 changes: 2 additions & 1 deletion tests/direct.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@ function createTest (cname, conntype) {
conntype
)})`,
async function (test) {
if (Mongo.Collection.get(cname)) return

Check failure on line 138 in tests/direct.js

View workflow job for this annotation

GitHub Actions / test

Trailing spaces not allowed
const collection = new Mongo.Collection(cname, conntype)

// Full permissions on collection
collection.allow({
insert: function () {
Expand Down

0 comments on commit 5761671

Please sign in to comment.