forked from covidatlas/coronadatascraper
-
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.
- Loading branch information
Showing
8 changed files
with
3,791 additions
and
35 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"node": "current" | ||
} | ||
} | ||
] | ||
] | ||
} |
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,32 @@ | ||
name: Test CI | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
runs-on: [macOS-latest] | ||
steps: | ||
- uses: actions/checkout@v1 # without submodules | ||
with: | ||
persist-credentials: false | ||
- name: Disable the keychain credential helper | ||
run: git config --global credential.helper "" | ||
- name: Enable the local store credential helper | ||
run: git config --global --add credential.helper store | ||
- name: Add credential | ||
run: echo "https://x-access-token:${{ secrets.GIT_SECRET }}@github.com" >> ~/.git-credentials | ||
- name: Tell git to use https instead of ssh whenever it encounters it | ||
run: 'git config --global url."https://github.com/".insteadof [email protected]:' | ||
- name: Update submodules | ||
run: | | ||
git submodule update --init | ||
- name: Use Node.js 13.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '13.x' | ||
- name: Install | ||
run: | | ||
yarn | ||
- name: Test | ||
run: | | ||
yarn test |
Submodule coronadatascraper-cache
updated
43 files
Submodule coronavirus-data-sources
updated
2 files
+0 −1 | curated/curated.csv | |
+0 −192 | lib/jhuUSCountyMap.json |
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,55 @@ | ||
import each from 'jest-each'; | ||
|
||
import * as parse from './parse'; | ||
|
||
describe('Parse functions', () => { | ||
describe('number', () => { | ||
const tests = [ | ||
['', 0], | ||
['0', 0], | ||
['1', 1], | ||
['-1', -1], | ||
['10', 10], | ||
['1.1', 11], | ||
['-1.1', -11], | ||
['25abc', 25], | ||
['as-12asdasd', -12] | ||
]; | ||
each(tests).test('when passed "%s", it returns %d', (str, expected) => { | ||
expect(parse.number(str)).toBe(expected); | ||
}); | ||
}); | ||
|
||
describe('float', () => { | ||
const tests = [ | ||
['', 0], | ||
['0', 0], | ||
['1', 1], | ||
['-1', -1], | ||
['10', 10], | ||
['1.1', 1.1], | ||
['-1.1', -1.1], | ||
['25abc', 25], | ||
['as-12asdasd', -12] | ||
]; | ||
each(tests).test('when passed "%s", it returns %d', (str, expected) => { | ||
expect(parse.float(str)).toBe(expected); | ||
}); | ||
}); | ||
|
||
describe('string', () => { | ||
const tests = [ | ||
['', ''], | ||
['should not change', 'should not change'], | ||
['0', '0'], | ||
['****test', 'test'], | ||
['this is some text\nsecond line', 'this is some text second line'], | ||
['this some test', 'this some test'], | ||
['this is padded text ', 'this is padded text'], | ||
[' this is padded text', 'this is padded text'] | ||
]; | ||
each(tests).test('when passed "%s", it returns "%s"', (str, expected) => { | ||
expect(parse.string(str)).toBe(expected); | ||
}); | ||
}); | ||
}); |
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
Oops, something went wrong.