Housekeeping

This commit is contained in:
Angelos Chalaris
2019-01-09 19:37:32 +02:00
parent 404ab9a53f
commit 3adc97dfd3
8 changed files with 1523 additions and 4639 deletions

3
.gitignore vendored
View File

@@ -7,5 +7,4 @@ test.sh
dist/flavor\.min\.css dist/flavor\.min\.css
dist/flavor\.css dist/flavor\.css
test_old/ test_old/
coverage/clover.xml coverage/
coverage/lcov-report

View File

@@ -13,7 +13,7 @@ script:
- npm run linter - npm run linter
- npm run packager - npm run packager
- npm run tester - npm run tester
- npm run test-with-coverage - npm run test
- npm run extractor - npm run extractor
- npm run vscoder - npm run vscoder
- npm run glossary:keymaker - npm run glossary:keymaker

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

3088
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -36,8 +36,7 @@
"vscoder": "node ./scripts/vscodegen.js", "vscoder": "node ./scripts/vscodegen.js",
"packager": "node ./scripts/module.js", "packager": "node ./scripts/module.js",
"localizer": "node ./scripts/localize.js", "localizer": "node ./scripts/localize.js",
"test": "jest --verbose --coverage", "test": "jest --verbose --coverage"
"test-with-coverage": "jest --coverage && cat ./coverage/lcov.info | codacy-coverage"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@@ -3,7 +3,7 @@
# 30 seconds of code # 30 seconds of code
[![License](https://img.shields.io/badge/license-CC0--1.0-blue.svg)](https://github.com/30-seconds/30-seconds-of-code/blob/master/LICENSE) [![npm Downloads](https://img.shields.io/npm/dt/30-seconds-of-code.svg)](https://www.npmjs.com/package/30-seconds-of-code) [![npm Version](https://img.shields.io/npm/v/30-seconds-of-code.svg)](https://www.npmjs.com/package/30-seconds-of-code) [![Known Vulnerabilities](https://snyk.io/test/github/30-seconds/30-seconds-of-code/badge.svg?targetFile=package.json)](https://snyk.io/test/github/30-seconds/30-seconds-of-code?targetFile=package.json) <br/> [![License](https://img.shields.io/badge/license-CC0--1.0-blue.svg)](https://github.com/30-seconds/30-seconds-of-code/blob/master/LICENSE) [![npm Downloads](https://img.shields.io/npm/dt/30-seconds-of-code.svg)](https://www.npmjs.com/package/30-seconds-of-code) [![npm Version](https://img.shields.io/npm/v/30-seconds-of-code.svg)](https://www.npmjs.com/package/30-seconds-of-code) [![Known Vulnerabilities](https://snyk.io/test/github/30-seconds/30-seconds-of-code/badge.svg?targetFile=package.json)](https://snyk.io/test/github/30-seconds/30-seconds-of-code?targetFile=package.json) <br/>
[![Travis Build](https://travis-ci.com/30-seconds/30-seconds-of-code.svg?branch=master)](https://travis-ci.com/30-seconds/30-seconds-of-code) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/6ab7791fb1ea40b4a576d658fb96807f)](https://www.codacy.com/app/Chalarangelo/30-seconds-of-code?utm_source=github.com&utm_medium=referral&utm_content=30-seconds/30-seconds-of-code&utm_campaign=Badge_Grade) [![Maintainability](https://api.codeclimate.com/v1/badges/4b8c1e099135f2d53413/maintainability)](https://codeclimate.com/github/30-seconds/30-seconds-of-code/maintainability) [![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg)](https://github.com/Flet/semistandard) <br/> [![Travis Build](https://travis-ci.com/30-seconds/30-seconds-of-code.svg?branch=master)](https://travis-ci.com/30-seconds/30-seconds-of-code) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/6ab7791fb1ea40b4a576d658fb96807f)](https://www.codacy.com/app/Chalarangelo/30-seconds-of-code?utm_source=github.com&utm_medium=referral&utm_content=30-seconds/30-seconds-of-code&utm_campaign=Badge_Grade) [![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg)](https://github.com/Flet/semistandard) <br/>
[![Awesome](https://awesome.re/badge.svg)](https://awesome.re) [![ProductHunt](https://img.shields.io/badge/producthunt-vote-orange.svg)](https://www.producthunt.com/posts/30-seconds-of-code) [![Gitter chat](https://img.shields.io/badge/chat-on%20gitter-4FB999.svg)](https://gitter.im/30-seconds-of-code/Lobby) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com) [![Awesome](https://awesome.re/badge.svg)](https://awesome.re) [![ProductHunt](https://img.shields.io/badge/producthunt-vote-orange.svg)](https://www.producthunt.com/posts/30-seconds-of-code) [![Gitter chat](https://img.shields.io/badge/chat-on%20gitter-4FB999.svg)](https://gitter.im/30-seconds-of-code/Lobby) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)
> Curated collection of useful JavaScript snippets that you can understand in 30 seconds or less. > Curated collection of useful JavaScript snippets that you can understand in 30 seconds or less.

View File

@@ -4,6 +4,9 @@ const {tomorrow} = require('./_30s.js');
test('tomorrow is a Function', () => { test('tomorrow is a Function', () => {
expect(tomorrow).toBeInstanceOf(Function); expect(tomorrow).toBeInstanceOf(Function);
}); });
test('Returns the correct type', () => {
expect(typeof tomorrow()).toBe('string');
});
const t1 = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + 1); const t1 = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + 1);
const t2 = new Date(tomorrow()); const t2 = new Date(tomorrow());
test('Returns the correct year', () => { test('Returns the correct year', () => {