We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1f08084 + 0cfbff4 commit 97343d3Copy full SHA for 97343d3
test/sanity-check/api/user-test.js
@@ -136,11 +136,11 @@ describe('Contentstack User Session api Test', () => {
136
// The new implementation uses getContentstackEndpoint which handles region validation
137
// It should not throw an error, but will use whatever getContentstackEndpoint returns
138
try {
139
- const client = contentstack.client({ region: 'DUMMYREGION' })
140
- expect(client).to.not.equal(null, 'Client should be created even with invalid region')
141
- done()
+ contentstack.client({ region: 'DUMMYREGION' })
+ done(new Error('Expected an error to be thrown for invalid region'))
142
} catch (error) {
143
- done(error)
+ expect(error.message).to.include('Invalid region')
+ done()
144
}
145
})
146
0 commit comments