File tree Expand file tree Collapse file tree
libraries/rush-lib/src/logic/test Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44import { type IPackageJson , JsonFile } from '@rushstack/node-core-library' ;
55import { StringBufferTerminalProvider , Terminal } from '@rushstack/terminal' ;
6+ import { TestUtilities } from '@rushstack/heft-config-file' ;
67
78import { InstallHelpers } from '../installManager/InstallHelpers' ;
89import { RushConfiguration } from '../../api/RushConfiguration' ;
@@ -110,12 +111,12 @@ describe(InstallHelpers.name, () => {
110111 expect ( packageJson ) . not . toHaveProperty ( 'pnpm' ) ;
111112
112113 // ...and the relocated settings are instead placed on the generated pnpm-workspace.yaml file.
113- // (The arrays are spread to drop the ConfigurationFile annotation symbol they carry.)
114- const workspaceFile : PnpmWorkspaceFile = pnpmSettings ! . workspaceFile ;
115- expect ( [ ... ( workspaceFile . ignoredOptionalDependencies ?? [ ] ) ] ) . toEqual ( [ 'fsevents' ] ) ;
116- expect ( workspaceFile . trustPolicy ) . toEqual ( 'no-downgrade' ) ;
117- expect ( [ ... ( workspaceFile . trustPolicyExclude ?? [ ] ) ] ) . toEqual ( [ 'chokidar@4.0.3' ] ) ;
118- expect ( workspaceFile . trustPolicyIgnoreAfter ) . toEqual ( 1440 ) ;
114+ const workspaceFile : PnpmWorkspaceFile | undefined =
115+ TestUtilities . stripAnnotations ( pnpmSettings ) ? .workspaceFile ;
116+ expect ( workspaceFile ? .ignoredOptionalDependencies ) . toEqual ( [ 'fsevents' ] ) ;
117+ expect ( workspaceFile ? .trustPolicy ) . toEqual ( 'no-downgrade' ) ;
118+ expect ( workspaceFile ? .trustPolicyExclude ) . toEqual ( [ 'chokidar@4.0.3' ] ) ;
119+ expect ( workspaceFile ? .trustPolicyIgnoreAfter ) . toEqual ( 1440 ) ;
119120 } ) ;
120121 } ) ;
121122} ) ;
You can’t perform that action at this time.
0 commit comments