fix(core): update

This commit is contained in:
2020-03-17 00:38:58 +00:00
parent 0d3292dd1e
commit e72a5cb4af
23 changed files with 788 additions and 936 deletions

View File

@ -11,12 +11,12 @@ tap.test('should create valid instances', async () => {
npmRegistry = new smartnpm.NpmRegistry();
expect(npmRegistry).to.be.instanceof(smartnpm.NpmRegistry);
testPackage = new smartnpm.NpmPackage();
testPackage = new smartnpm.NpmPackage(npmRegistry);
expect(testPackage).to.be.instanceof(smartnpm.NpmPackage);
});
tap.test('should produce a valid search string and this return npmts', async () => {
const packages = await npmRegistry.search({
const packages = await npmRegistry.searchOnNpm({
name: '@pushrocks/smartupdate'
});
expect(packages[0].name).to.equal('@pushrocks/smartupdate');
@ -30,9 +30,17 @@ tap.test('should create a verdaccio registry', async () => {
expect(verdaccioRegistry).to.be.instanceOf(smartnpm.NpmRegistry);
});
tap.test('should get package from verdaccui', async () => {
tap.test('should get package from verdaccio', async () => {
const npmPackage = await verdaccioRegistry.getPackageInfo('@pushrocks/smartupdate');
console.log(npmPackage);
expect(npmPackage.license).to.equal('MIT');
});
tap.test('should get a specific file from a package', async () => {
const bundleFile = await verdaccioRegistry.getFileFromPackage(
'@pushrocks/websetup',
'dist_bundle/bundle.js'
);
});
tap.start();