File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11import { describe , it } from 'jsr:@std/testing/bdd'
22import { expect } from 'jsr:@std/expect'
3+ import getAllFieldCombinations from '../utils/testing/get-all-field-combinations.ts'
34import { isUserAttributes } from './user-attributes.ts'
45
56describe ( 'isUserAttributes' , ( ) => {
@@ -14,10 +15,10 @@ describe('isUserAttributes', () => {
1415 } )
1516
1617 it ( 'returns true if given a UserAttributes object' , ( ) => {
17- expect ( isUserAttributes ( { } ) ) . toBe ( true )
18- expect ( isUserAttributes ( { name } ) ) . toBe ( true )
19- expect ( isUserAttributes ( { username } ) ) . toBe ( true )
20- expect ( isUserAttributes ( { name , username } ) ) . toBe ( true )
18+ const objects = getAllFieldCombinations ( { name , username } )
19+ for ( const object of objects ) {
20+ expect ( isUserAttributes ( object ) ) . toBe ( true )
21+ }
2122 } )
2223
2324 it ( 'returns false if the object has additional properties' , ( ) => {
You can’t perform that action at this time.
0 commit comments