update to working search

This commit is contained in:
2017-08-15 17:03:21 +02:00
parent d9573937d0
commit 8edb49d9fb
18 changed files with 412 additions and 36 deletions

View File

@ -1,8 +1,22 @@
import { expect, tap } from 'tapbundle'
import * as smartnpm from '../ts/index'
tap.test('first test', async () => {
console.log(smartnpm.standardExport)
let testRegistry: smartnpm.NpmRegistry
let testPackage: smartnpm.NpmPackage
tap.test('should create valid instances', async () => {
testRegistry = new smartnpm.NpmRegistry()
expect(testRegistry).to.be.instanceof(smartnpm.NpmRegistry)
testPackage = new smartnpm.NpmPackage({})
expect(testPackage).to.be.instanceof(smartnpm.NpmPackage)
})
tap.test('should produce a valid search string', async () => {
let packages = await testRegistry.search({
name: 'npmts'
})
expect(packages[0].name).to.equal('npmts')
})
tap.start()