Spaces:
Running
Running
Download node_modules/@mswjs/interceptors/src/utils/getValueBySymbol.test.ts from fffiloni/live-vision: direct link, hf CLI and curl.
- Browser
- Download file 530 Bytes
-
https://huggingface.co/spaces/fffiloni/live-vision/resolve/main/node_modules/%40mswjs/interceptors/src/utils/getValueBySymbol.test.ts
- Command line
-
hf download hf://spaces/fffiloni/live-vision/node_modules/@mswjs/interceptors/src/utils/getValueBySymbol.test.ts
-
curl -L -o getValueBySymbol.test.ts https://huggingface.co/spaces/fffiloni/live-vision/resolve/main/node_modules/%40mswjs/interceptors/src/utils/getValueBySymbol.test.ts
530 Bytes
| import { it, expect } from 'vitest' | |
| import { getValueBySymbol } from './getValueBySymbol' | |
| it('returns undefined given a non-existing symbol', () => { | |
| expect(getValueBySymbol('non-existing', {})).toBeUndefined() | |
| }) | |
| it('returns value behind the given symbol', () => { | |
| const symbol = Symbol('kInternal') | |
| expect(getValueBySymbol('kInternal', { [symbol]: null })).toBe(null) | |
| expect(getValueBySymbol('kInternal', { [symbol]: true })).toBe(true) | |
| expect(getValueBySymbol('kInternal', { [symbol]: 'value' })).toBe('value') | |
| }) | |