diff --git a/test/resolve/adapters/baseSourceAdapter.test.ts b/test/resolve/adapters/baseSourceAdapter.test.ts index 55a7b4986..db5bfba20 100644 --- a/test/resolve/adapters/baseSourceAdapter.test.ts +++ b/test/resolve/adapters/baseSourceAdapter.test.ts @@ -8,6 +8,7 @@ import { join } from 'node:path'; import { Messages, SfError } from '@salesforce/core'; import { assert, expect } from 'chai'; +import { posixify } from '../../../src/utils/path'; import { decomposed, mixedContentSingleFile, nestedTypes, xmlInFolder, document } from '../../mock'; import { getComponent } from '../../../src/resolve/adapters/baseSourceAdapter'; import { META_XML_SUFFIX } from '../../../src/common'; @@ -55,7 +56,7 @@ describe('BaseSourceAdapter', () => { it('should throw an error if a metadata xml file is forceignored', () => { const type = registry.getRegistry().types.apexclass; const path = join('path', 'to', type.directoryName, `My_Test.${type.suffix}${META_XML_SUFFIX}`); - const adapterWithIgnore = getComponent({ tree, registry, forceIgnore: new ForceIgnore('', `${path}`) }); + const adapterWithIgnore = getComponent({ tree, registry, forceIgnore: new ForceIgnore('', posixify(path)) }); assert.throws( () => adapterWithIgnore({ path, type }), diff --git a/test/resolve/adapters/matchingContentSourceAdapter.test.ts b/test/resolve/adapters/matchingContentSourceAdapter.test.ts index bace92ac3..ea4eab2f6 100644 --- a/test/resolve/adapters/matchingContentSourceAdapter.test.ts +++ b/test/resolve/adapters/matchingContentSourceAdapter.test.ts @@ -7,6 +7,7 @@ import { join } from 'node:path'; import { assert, expect } from 'chai'; import { Messages, SfError } from '@salesforce/core'; +import { posixify } from '../../../src/utils/path'; import { getMatchingContentComponent } from '../../../src/resolve/adapters/matchingContentSourceAdapter'; import { matchingContentFile } from '../../mock'; import { ForceIgnore, registry, RegistryAccess, SourceComponent, VirtualTreeContainer } from '../../../src'; @@ -57,7 +58,7 @@ describe('MatchingContentSourceAdapter', () => { describe(' forceignore', () => { it('Should throw an error if content file is forceignored', () => { const path = CONTENT_PATHS[0]; - const forceIgnore = new ForceIgnore('', `${path}`); + const forceIgnore = new ForceIgnore('', `${posixify(path)}`); const adapter = getMatchingContentComponent({ registry: registryAccess, tree, forceIgnore }); assert.throws( () => adapter({ path, type }), diff --git a/test/resolve/adapters/mixedContentSourceAdapter.test.ts b/test/resolve/adapters/mixedContentSourceAdapter.test.ts index 6e1b8778e..c0640f25a 100644 --- a/test/resolve/adapters/mixedContentSourceAdapter.test.ts +++ b/test/resolve/adapters/mixedContentSourceAdapter.test.ts @@ -7,6 +7,7 @@ import { assert, expect, config } from 'chai'; import { Messages, SfError } from '@salesforce/core'; import { ensureString } from '@salesforce/ts-types'; +import { posixify } from '../../../src/utils/path'; import { getMixedContentComponent } from '../../../src/resolve/adapters/mixedContentSourceAdapter'; import { ForceIgnore, registry, RegistryAccess, SourceComponent, VirtualTreeContainer } from '../../../src'; import { @@ -44,7 +45,10 @@ describe('MixedContentSourceAdapter', () => { const adapter = getMixedContentComponent({ registry: registryAccess, tree, - forceIgnore: new ForceIgnore('', mixedContentDirectory.MIXED_CONTENT_DIRECTORY_SOURCE_PATHS.join('\n')), + forceIgnore: new ForceIgnore( + '', + mixedContentDirectory.MIXED_CONTENT_DIRECTORY_SOURCE_PATHS.map(posixify).join('\n') + ), }); const path = mixedContentDirectory.MIXED_CONTENT_DIRECTORY_SOURCE_PATHS[0];