-
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,304 additions
and
2 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,28 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: # CircleCI tags: https://circleci.com/docs/2.0/docker-image-tags.json | ||
- image: circleci/node:10-browsers # Node tags: https://nodejs.org/en/download/releases/ | ||
steps: | ||
- checkout | ||
|
||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- run: yarn | ||
|
||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "yarn.lock" }} | ||
|
||
- run: | ||
name: Lint | ||
command: yarn lint | ||
- run: | ||
name: Test | ||
command: yarn test |
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,26 @@ | ||
module.exports = { | ||
root: true, | ||
parserOptions: { | ||
ecmaVersion: 2015, | ||
sourceType: 'module' | ||
}, | ||
plugins: ['prettier'], | ||
extends: ['eslint:recommended', 'plugin:prettier/recommended'], | ||
env: { | ||
browser: true, | ||
node: true | ||
}, | ||
overrides: [ | ||
{ | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 2017 | ||
}, | ||
env: { | ||
browser: false, | ||
node: true | ||
}, | ||
files: ['test*.js', 'tests/**/*.js'] | ||
} | ||
] | ||
}; |
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 +1,14 @@ | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# misc | ||
/.env | ||
/.tool-versions | ||
/coverage/* | ||
/libpeerconnection.log | ||
npm-debug.log* | ||
package-lock.json | ||
yarn-error.log | ||
|
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,3 @@ | ||
{ | ||
"singleQuote": true | ||
} |
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,37 @@ | ||
import test from 'ava'; | ||
import random from './random-emoji'; | ||
|
||
test('without arguments it shows an emoticon', t => { | ||
const a = random(); | ||
const cp = a.codePointAt(); | ||
t.assert(cp >= 0x1f600, 'greater than min'); | ||
t.assert(cp <= 0x1f64f, 'less than max'); | ||
}); | ||
|
||
test('with argument "emoticons" it shows an emoticon', t => { | ||
const a = random('emoticons'); | ||
const cp = a.codePointAt(); | ||
t.assert(cp >= 0x1f600, 'greater than min'); | ||
t.assert(cp <= 0x1f64f, 'less than max'); | ||
}); | ||
|
||
test('with argument "food" it shows a food emoji', t => { | ||
const a = random('food'); | ||
const cp = a.codePointAt(); | ||
t.assert(cp >= 0x1f32d, 'greater than min'); | ||
t.assert(cp <= 0x1f37f, 'less than max'); | ||
}); | ||
|
||
test('with argument "animals" it shows an animal friend emoji', t => { | ||
const a = random('animals'); | ||
const cp = a.codePointAt(); | ||
t.assert(cp >= 0x1f400, 'greater than min'); | ||
t.assert(cp <= 0x1f4d3, 'less than max'); | ||
}); | ||
|
||
test('with argument "expressions" it shows an facial expression emoji', t => { | ||
const a = random('expressions'); | ||
const cp = a.codePointAt(); | ||
t.assert(cp >= 0x1f910, 'greater than min'); | ||
t.assert(cp <= 0x1f92f, 'less than max'); | ||
}); |
Oops, something went wrong.