-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(package-information): add package information methods
- Loading branch information
1 parent
b66a750
commit b103814
Showing
2 changed files
with
33 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,40 @@ | ||
import { | ||
search, | ||
getSuggestions, | ||
getPackageInformation, | ||
getPackagesInformation, | ||
} from './'; | ||
|
||
describe('integration test', () => { | ||
describe('#search', () => { | ||
it('should search with term "fruit"', async () => { | ||
const response = await search({ terms: ['fruit'] }); | ||
console.log(response); | ||
expect(response).toBeDefined(); | ||
}); | ||
}); | ||
|
||
describe('#getSuggestions', () => { | ||
it('should get suggestions for term "fruit"', async () => { | ||
const response = await getSuggestions({ terms: ['fruit'] }); | ||
console.log(response); | ||
expect(response).toBeDefined(); | ||
}); | ||
}); | ||
|
||
describe('#getPackageInformation', () => { | ||
it('should get package information for fruit', async () => { | ||
const response = await getPackageInformation('fruit'); | ||
expect(response).toBeDefined(); | ||
}); | ||
}); | ||
|
||
describe('#getPackagseInformation', () => { | ||
it('should get package information for react, react-dom, and prop-types', async () => { | ||
try { | ||
const response = await getPackagesInformation(['react', 'react-dom', 'prop-types']); | ||
console.log(response); | ||
} catch (e) { | ||
console.log(e); | ||
} | ||
}); | ||
}); | ||
}); |