()
| 67 | }); |
| 68 | |
| 69 | async function seedProfiles() { |
| 70 | const { profiles } = generateSeedData(); |
| 71 | console.info("Creating test profiles..."); |
| 72 | try { |
| 73 | console.time("Test profiles created in"); |
| 74 | const profileNames = profiles.map((profile) => profile.userName); |
| 75 | await canister.createTestData(profileNames.slice(1), []); |
| 76 | |
| 77 | // set up followings |
| 78 | profiles.forEach((profile) => { |
| 79 | profile.following.forEach((followedUser) => { |
| 80 | canister.putProfileFollow(followedUser, profile.userName, true); |
| 81 | }); |
| 82 | }); |
| 83 | console.timeEnd("Test profiles created in"); |
| 84 | } catch (error) { |
| 85 | console.error("Failed to create test profiles.", error); |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | async function seedVideos() { |
| 90 | const { videos } = generateSeedData(); |
no test coverage detected