Skip to content

Commit 31854f7

Browse files
committed
add more tests
1 parent 36fcabd commit 31854f7

File tree

1 file changed

+24
-0
lines changed
  • packages/browser/src/core/arguments-resolver/__tests__

1 file changed

+24
-0
lines changed

packages/browser/src/core/arguments-resolver/__tests__/index.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,30 @@ describe(resolvePageArguments, () => {
235235
expect(cb).toEqual(undefined)
236236
})
237237

238+
it('should accept ("name")', () => {
239+
const [category, name, properties, options, cb] =
240+
resolvePageArguments('name')
241+
242+
expect(name).toEqual('name')
243+
expect(category).toEqual(null)
244+
expect(properties).toEqual({})
245+
expect(options).toEqual({})
246+
expect(cb).toEqual(undefined)
247+
})
248+
249+
it('should accept ("", "name")', () => {
250+
const [category, name, properties, options, cb] = resolvePageArguments(
251+
'',
252+
'name'
253+
)
254+
255+
expect(name).toEqual('name')
256+
expect(category).toEqual('')
257+
expect(properties).toEqual({})
258+
expect(options).toEqual({})
259+
expect(cb).toEqual(undefined)
260+
})
261+
238262
it('should accept (category, name, properties, options, cb)', () => {
239263
const fn = jest.fn()
240264
const [category, name, properties, options, cb] = resolvePageArguments(

0 commit comments

Comments
 (0)