Skip to content

Instantly share code, notes, and snippets.

@maltebucksch
Last active July 24, 2023 20:36
Show Gist options
  • Save maltebucksch/9b53f39545ede48fab9b9da45665909a to your computer and use it in GitHub Desktop.
Save maltebucksch/9b53f39545ede48fab9b9da45665909a to your computer and use it in GitHub Desktop.
describe(`Quickbird Studios Team`, function() {
it(`should be an awesome team`, function() {
const quickBirdTeamMembers = fetchTeamMembers();
const awesomeTeamMembers = quickBirdTeamMembers.filter(teamMember =>
teamMember.isPassionate &&
teamMember.isFriendly &&
teamMember.isConstantlyImproving
);
assert.equal(awesomeTeamMembers.length, quickBirdTeamMembers.length);
});
});
@yakhousam
Copy link

yakhousam commented May 24, 2022

I think fetchTeamMembers is async, we should wait for it to resolve to continue the test.

describe(`Quickbird Studios Team`, function() {
    it(`should be an awesome team`, async function() {
        const quickBirdTeamMembers = await fetchTeamMembers();
      
        const awesomeTeamMembers = quickBirdTeamMembers.filter(teamMember =>
            teamMember.isPassionate &&
            teamMember.isFriendly &&
            teamMember.isConstantlyImproving
        );
      
        assert.equal(awesomeTeamMembers.length, quickBirdTeamMembers.length);
    });
});

@Nanobot234
Copy link

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment