Skip to content

Commit 05975ed

Browse files
committed
Fix build tests
1 parent 4ef662e commit 05975ed

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"test:build": "yarn build && jest --runInBand --selectProjects build",
1212
"test:e2e": "yarn local:env:setup && concurrently --kill-others -s first \"yarn local:env:react\" \"cypress run --env playground=local \"",
1313
"test:e2e:watch": "yarn local:env:setup && concurrently --kill-others -s first \"yarn local:env:react\" \"cypress open --env playground=local\"",
14-
"test:all": "yarn test:e2e:all && yarn test && test:build",
14+
"test:all": "yarn test:e2e && yarn test && yarn test:build",
1515
"cy:open": "cypress open",
1616
"playground:vue": "yarn --cwd ./playgrounds/vue && yarn --cwd ./playgrounds/vue serve",
1717
"playground:react": "yarn --cwd ./playgrounds/react && yarn --cwd ./playgrounds/react start",

tests/build.tests.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ const CJSclient = CJSinstantMeiliSearch('http://localhost:7700', 'masterKey')
1010
const instantsearch = require('instantsearch.js')
1111

1212
test('UMD client should correctly created', () => {
13-
expect(UMDclient.MeiliSearchClient.config.apiKey).toBe('masterKey')
13+
expect(UMDclient.search).not.toBeUndefined()
1414
})
1515

1616
test('CJS client should correctly created', () => {
17-
expect(CJSclient.MeiliSearchClient.config.apiKey).toBe('masterKey')
17+
expect(CJSclient.search).not.toBeUndefined()
1818
})
1919

2020
test('CJS instantsearch client should correctly created', () => {
@@ -23,9 +23,7 @@ test('CJS instantsearch client should correctly created', () => {
2323
searchClient: CJSclient,
2424
})
2525
expect(CJSInstantSearch.indexName).toBe('cjs_index')
26-
expect(CJSInstantSearch.client.MeiliSearchClient.config.apiKey).toBe(
27-
'masterKey'
28-
)
26+
expect(CJSInstantSearch.client.search).not.toBeUndefined()
2927
})
3028

3129
test('UMD instantsearch client should correctly created', () => {
@@ -34,7 +32,5 @@ test('UMD instantsearch client should correctly created', () => {
3432
searchClient: UMDclient,
3533
})
3634
expect(UMDInstantSearch.indexName).toBe('umd_index')
37-
expect(UMDInstantSearch.client.MeiliSearchClient.config.apiKey).toBe(
38-
'masterKey'
39-
)
35+
expect(UMDInstantSearch.client.search).not.toBeUndefined()
4036
})

0 commit comments

Comments
 (0)