update to working search
This commit is contained in:
18
test/test.ts
18
test/test.ts
@ -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()
|
||||
|
Reference in New Issue
Block a user