Skip to content

Commit a508c54

Browse files
committed
test: add operation.deprecated check
1 parent 4632f92 commit a508c54

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/deprecated.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import { Editor, LocalRegistry } from './helpers'
18-
import { BREAKING_CHANGE_TYPE, BUILD_TYPE, RISKY_CHANGE_TYPE, SEMI_BREAKING_CHANGE_TYPE, VERSION_STATUS } from '../src'
18+
import { BREAKING_CHANGE_TYPE, BUILD_TYPE, RISKY_CHANGE_TYPE, VERSION_STATUS } from '../src'
1919

2020
const portal = new LocalRegistry('deprecated')
2121

@@ -75,6 +75,11 @@ describe('Deprecated Items test', () => {
7575
const result = await editor.run()
7676

7777
const deprecatedItems = Array.from(result.operations.values()).flatMap(operation => operation.deprecatedItems)
78+
expect(Array.from(result.operations.values())).toEqual(expect.toIncludeSameMembers([
79+
expect.objectContaining({ deprecated: true }),
80+
expect.objectContaining({ deprecated: false }),
81+
expect.objectContaining({ deprecated: false }),
82+
]))
7883

7984
expect(deprecatedItems.every(item => item?.description?.startsWith('[Deprecated]'))).toBeTruthy()
8085
expect(result.operations.get('auth-saml-post')?.deprecatedItems?.[0].deprecatedInPreviousVersions.length).toBe(2)

0 commit comments

Comments
 (0)