From e9506878e8f1fbdca0461a5f6c65c70c33741c1f Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Sat, 14 Oct 2023 11:14:08 +0200 Subject: [PATCH] Try client side test async --- .github/workflows/testsuite.yml | 2 +- package.js | 2 +- roles/roles_common_async.js | 2 +- roles/tests/clientAsync.js | 5 ++++- testapp/package-lock.json | 6 +++--- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index aa1ff18..ffce9b1 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -37,7 +37,7 @@ jobs: matrix: meteorRelease: - '2.8.0' - - '2.13' + - '2.13.3' # Latest version steps: - name: Checkout code diff --git a/package.js b/package.js index f362cf2..eef959f 100644 --- a/package.js +++ b/package.js @@ -44,7 +44,7 @@ Package.onTest(function (api) { 'meteortesting:mocha@2.1.0' ]) - api.versionsFrom('2.3') + api.versionsFrom(['2.3', '2.8.1']) const both = ['client', 'server'] diff --git a/roles/roles_common_async.js b/roles/roles_common_async.js index 0e97f79..7d3369c 100644 --- a/roles/roles_common_async.js +++ b/roles/roles_common_async.js @@ -313,7 +313,7 @@ Object.assign(Roles, { ) // if there was no change, parent role might not exist, or role is - // already a subrole; in any case we do not have anything more to do + // already a sub-role; in any case we do not have anything more to do if (!count) return await Meteor.roleAssignment.updateAsync( diff --git a/roles/tests/clientAsync.js b/roles/tests/clientAsync.js index c931896..0f606b7 100644 --- a/roles/tests/clientAsync.js +++ b/roles/tests/clientAsync.js @@ -2,7 +2,10 @@ /* global Roles */ import { Meteor } from 'meteor/meteor' -import { assert } from 'chai' +import chai, { assert } from 'chai' +import chaiAsPromised from 'chai-as-promised' + +chai.use(chaiAsPromised) // To ensure that the files are loaded for coverage import '../roles_common' diff --git a/testapp/package-lock.json b/testapp/package-lock.json index 0d1ed7d..ca5c8cc 100644 --- a/testapp/package-lock.json +++ b/testapp/package-lock.json @@ -200,9 +200,9 @@ "dev": true }, "@babel/runtime": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.10.tgz", - "integrity": "sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", + "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", "requires": { "regenerator-runtime": "^0.14.0" }