Skip to content

Commit

Permalink
Updated tests for Meteor 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Bero committed Feb 23, 2024
1 parent c678209 commit 5518fec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ module.exports = {
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-this-alias': 'off',
},
};
2 changes: 1 addition & 1 deletion lib/links/linker.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export default class Linker {
const accessor = this.createLink(doc);

const items = await accessor.fetchAsArray();
for await (const linkedObj of items) {
for (const linkedObj of items) {
const { relatedLinker } = this.linkConfig;
// We do this check, to avoid self-referencing hell when defining virtual links
// Virtual links if not found "compile-time", we will try again to reprocess them on Meteor.startup
Expand Down
8 changes: 4 additions & 4 deletions lib/query/testing/bootstrap/fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ let authors = await Promise.all(
);

let idx = 1;
for await (const author of authors) {
for (const author of authors) {
idx++;
const authorPostLink = await Authors.getLink(author, 'posts');
const authorGroupLink = await Authors.getLink(author, 'groups');
Expand All @@ -64,7 +64,7 @@ for await (const author of authors) {
isAdmin: _.sample([true, false]),
});

for await (const idx of _.range(POST_PER_USER)) {
for (const idx of _.range(POST_PER_USER)) {
let post = {
title: `User Post - ${idx}`,
metadata: {
Expand All @@ -87,7 +87,7 @@ for await (const author of authors) {

await postTagsLink.add(_.sample(tags));

for await (const commentIdx of _.range(COMMENTS_PER_POST)) {
for (const commentIdx of _.range(COMMENTS_PER_POST)) {
let comment = {
text: _.sample(COMMENT_TEXT_SAMPLES),
};
Expand All @@ -100,7 +100,7 @@ for await (const author of authors) {

const friendIds = [];
// each user is created so his friends are previously added users
for await (const idx of _.range(USERS)) {
for (const idx of _.range(USERS)) {
const id = await Users.insertAsync({
name: `User - ${idx}`,
friendIds,
Expand Down

0 comments on commit 5518fec

Please sign in to comment.