Skip to content

Commit

Permalink
fix race condition in users test: User.readAll() was assumed to retur…
Browse files Browse the repository at this point in the history
…n only those users created by the test itself, even though there are concurrent tests
  • Loading branch information
SillyFreak committed Jul 31, 2020
1 parent 170ee2b commit 7e8a4fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/controller/user.spec.js
Expand Up @@ -63,7 +63,7 @@ describe('User Controller', () => {
{
const users = await User.readAll();
// toMatchObject because sequelize model instances are not plain objects
expect(users).toMatchObject([
expect(users.filter((user) => user.plugin_uuid === plugin_uuid)).toMatchObject([
{
id: expect.any(Number),
uuid: expect.any(String),
Expand Down

0 comments on commit 7e8a4fc

Please sign in to comment.