Skip to content

Commit a5d1f8e

Browse files
committed
update tests to support building block prefix
1 parent d85df7c commit a5d1f8e

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

_jotai

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/atomEffect.test.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,25 +1007,27 @@ it('gets the right internals from the store', function test() {
10071007
'f' in storeHooks &&
10081008
typeof storeHooks.f === 'function'
10091009
) // storeHooks
1010-
expect(buildingBlocks[11].name).toBe('ensureAtomState')
1010+
expect(buildingBlocks[11].name.endsWith('ensureAtomState')).toBe(true)
10111011
expect(buildingBlocks[11]).toBeInstanceOf(Function)
10121012
expect(buildingBlocks[11]).toHaveLength(2)
1013-
expect(buildingBlocks[12].name).toBe('flushCallbacks')
1013+
expect(buildingBlocks[12].name.endsWith('flushCallbacks')).toBe(true)
10141014
expect(buildingBlocks[12]).toBeInstanceOf(Function)
10151015
expect(buildingBlocks[12]).toHaveLength(1)
1016-
expect(buildingBlocks[13].name).toBe('recomputeInvalidatedAtoms')
1016+
expect(buildingBlocks[13].name.endsWith('recomputeInvalidatedAtoms')).toBe(
1017+
true
1018+
)
10171019
expect(buildingBlocks[13]).toBeInstanceOf(Function)
10181020
expect(buildingBlocks[13]).toHaveLength(1)
1019-
expect(buildingBlocks[14].name).toBe('readAtomState')
1021+
expect(buildingBlocks[14].name.endsWith('readAtomState')).toBe(true)
10201022
expect(buildingBlocks[14]).toBeInstanceOf(Function)
10211023
expect(buildingBlocks[14]).toHaveLength(2)
1022-
expect(buildingBlocks[15].name).toBe('invalidateDependents')
1024+
expect(buildingBlocks[15].name.endsWith('invalidateDependents')).toBe(true)
10231025
expect(buildingBlocks[15]).toBeInstanceOf(Function)
10241026
expect(buildingBlocks[15]).toHaveLength(2)
1025-
expect(buildingBlocks[16].name).toBe('writeAtomState')
1027+
expect(buildingBlocks[16].name.endsWith('writeAtomState')).toBe(true)
10261028
expect(buildingBlocks[16]).toBeInstanceOf(Function)
10271029
expect(buildingBlocks[16]).toHaveLength(2)
1028-
expect(buildingBlocks[17].name).toBe('mountDependencies')
1030+
expect(buildingBlocks[17].name.endsWith('mountDependencies')).toBe(true)
10291031
expect(buildingBlocks[17]).toBeInstanceOf(Function)
10301032
expect(buildingBlocks[17]).toHaveLength(2)
10311033
})

vite.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export default defineConfig(({ mode }) => {
4343
environment: 'happy-dom',
4444
globals: true,
4545
include: ['tests/**/*.test.{ts,tsx}'],
46-
exclude: ['jotai/**'],
4746
},
4847
}
4948
})

0 commit comments

Comments
 (0)