-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* switch to ava from jest * add commonjs support export * remove pnpm * remove redundant packages
- Loading branch information
1 parent
7b84952
commit 6130342
Showing
11 changed files
with
88 additions
and
102 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/node_modules | ||
/package-lock.json | ||
/yarn-lock.json | ||
/pnpm-lock.yaml | ||
/yarn.lock | ||
/dist |
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,18 +1,5 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- "node" | ||
- "12" | ||
- "10" | ||
|
||
before_install: | ||
- npm install -g pnpm | ||
|
||
install: | ||
- pnpm install | ||
|
||
script: | ||
- pnpm run test | ||
|
||
notifications: | ||
email: false |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import test from 'ava'; | ||
import fetchMetaData from '../src'; | ||
|
||
test('check meta-data', async t => { | ||
const response = await fetchMetaData('https://google.com'); | ||
|
||
t.true(Object.prototype.hasOwnProperty.call(response, 'basic_metadata')); | ||
t.true(Object.prototype.hasOwnProperty.call(response, 'opengraph')); | ||
t.true(Object.prototype.hasOwnProperty.call(response, 'opengraph_social')); | ||
t.true(Object.prototype.hasOwnProperty.call(response, 'favicons')); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import test from 'ava'; | ||
import {createValidUri} from '../src/util'; | ||
|
||
test('creates valid URI', t => { | ||
const result: string = createValidUri('https://github.com/', '/rocktimsaikia'); | ||
t.is(result, 'https://github.com/rocktimsaikia'); | ||
}); | ||
|
||
test('returns the path', t => { | ||
const result: string = createValidUri('https://github.com/', 'https://github.com/rocktimsaikia'); | ||
t.is(result, 'https://github.com/rocktimsaikia'); | ||
}); |
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,17 +1,18 @@ | ||
|
||
{ | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"target": "es2018", | ||
"sourceMap": false, | ||
"incremental": false, | ||
"skipLibCheck": true, | ||
"declaration": true, | ||
"esModuleInterop": true, | ||
"lib": [ | ||
"es2018" | ||
] | ||
"extends": "@sindresorhus/tsconfig", | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"target": "es2018", | ||
"lib": [ | ||
"es2018" | ||
], | ||
"noImplicitReturns": false | ||
}, | ||
"include": [ | ||
"src/**/*" | ||
"include": [ | ||
"src" | ||
], | ||
"exclude": [ | ||
"example/**/*" | ||
] | ||
} |