Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/sanity-check/api/user-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ describe('Contentstack User Session api Test', () => {
// The new implementation uses getContentstackEndpoint which handles region validation
// It should not throw an error, but will use whatever getContentstackEndpoint returns
try {
const client = contentstack.client({ region: 'DUMMYREGION' })
expect(client).to.not.equal(null, 'Client should be created even with invalid region')
done()
contentstack.client({ region: 'DUMMYREGION' })
done(new Error('Expected an error to be thrown for invalid region'))
} catch (error) {
done(error)
expect(error.message).to.include('Invalid region')
done()
}
})
})
Loading