-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2419,8 +2419,11 @@ describe('test/core/service/PackageSyncerService/executeTask.test.ts', () => { | |
}); | ||
|
||
it('should resync history version if forceSyncHistory is true', async () => { | ||
const manifest = JSON.parse((await TestUtil.readFixturesFile('registry.npmjs.org/foobar.json')).toString()); | ||
manifest.versions['1.0.0']._npmUser = { name: 'apple', email: '[email protected]' }; | ||
manifest.maintainers = [ ...manifest.maintainers, { name: 'apple', email: '[email protected]' }]; | ||
app.mockHttpclient('https://registry.npmjs.org/foobar', 'GET', { | ||
data: await TestUtil.readFixturesFile('registry.npmjs.org/foobar.json'), | ||
data: manifest, | ||
persist: false, | ||
repeats: 1, | ||
}); | ||
|
@@ -2439,9 +2442,11 @@ describe('test/core/service/PackageSyncerService/executeTask.test.ts', () => { | |
assert(task); | ||
await packageSyncerService.executeTask(task); | ||
|
||
// should sync publisher | ||
const syncInfo = await packageManagerService.listPackageFullManifests('', 'foobar'); | ||
assert.equal(syncInfo.data?.versions['1.0.0']?._npmUser?.name, 'apple'); | ||
|
||
// resync | ||
const manifest = JSON.parse((await TestUtil.readFixturesFile('registry.npmjs.org/foobar.json')).toString()); | ||
manifest.versions['1.0.0']._npmUser = { name: 'banana', email: '[email protected]' }; | ||
app.mockHttpclient('https://registry.npmjs.org/foobar', 'GET', { | ||
data: manifest, | ||
|