setup ava for ts, port test/ to ts
This commit is contained in:
parent
acbf06e4ac
commit
09980caa67
8 changed files with 58 additions and 10 deletions
|
|
@ -2,10 +2,10 @@ import test from 'ava';
|
|||
const proxyquire = require('proxyquire').noCallThru();
|
||||
|
||||
test('existsOnNpm() builds the url for non-scoped packages', t => {
|
||||
let getUrl;
|
||||
let getUrl: string;
|
||||
const {existsOnNpm} = proxyquire('../../cli/api', {
|
||||
got: {
|
||||
get(url) {
|
||||
get(url: string) {
|
||||
getUrl = url;
|
||||
return Promise.resolve({
|
||||
body: {
|
||||
|
|
@ -23,10 +23,10 @@ test('existsOnNpm() builds the url for non-scoped packages', t => {
|
|||
});
|
||||
|
||||
test('existsOnNpm() builds the url for scoped packages', t => {
|
||||
let getUrl;
|
||||
let getUrl: string;
|
||||
const {existsOnNpm} = proxyquire('../../cli/api', {
|
||||
got: {
|
||||
get(url) {
|
||||
get(url: string) {
|
||||
getUrl = url;
|
||||
return Promise.resolve({
|
||||
body: {
|
||||
Loading…
Add table
Add a link
Reference in a new issue