Skip to content

add e2e for single sync - #688

Merged
emmaz90 merged 2 commits into
update-commonsfrom
single-sync-e2e
Jun 29, 2022
Merged

add e2e for single sync#688
emmaz90 merged 2 commits into
update-commonsfrom
single-sync-e2e

Conversation

@emmaz90

@emmaz90 emmaz90 commented Jun 28, 2022

Copy link
Copy Markdown
Contributor

JS SDK

What did you accomplish?

Added e2e tests for single sync

How do we test the changes introduced in this PR?

Extra Notes

splitio = SplitFactory(config);
client = splitio.client();
client.on(client.Event.SDK_READY, () => {
setTimeout(() => assert.end(), 1000);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

destroy the client here,
setTimeout(() => client.destroy().then(() => assert.end()), 1000);
to release all internal SDK timers that might hang the test.


export default function singleSync(fetchMock, assert) {

fetchMock.get(url(settings, `/v2/auth?users=${encodeURIComponent(userKey)}`), function () {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Emma, I think we can remove this /v2/auth mock

@EmilianoSanchez EmilianoSanchez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@emmaz90
emmaz90 merged commit b3408a1 into update-commons Jun 29, 2022
@emmaz90
emmaz90 deleted the single-sync-e2e branch June 29, 2022 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants