Commit fd21c518 authored by Mathew Parker's avatar Mathew Parker

Add jest unit tester to repo

parent e9c50dcd

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

module.exports = {
moduleFileExtensions: [
'js',
'jsx',
'json',
'vue'
],
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
snapshotSerializers: [
'jest-serializer-vue'
],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
],
testURL: 'http://localhost/'
}
../js-beautify/js/bin/css-beautify.js
\ No newline at end of file
../detect-libc/bin/detect-libc.js
\ No newline at end of file
../editorconfig/bin/editorconfig
\ No newline at end of file
../escodegen/bin/escodegen.js
\ No newline at end of file
../escodegen/bin/esgenerate.js
\ No newline at end of file
../esprima/bin/esparse.js
\ No newline at end of file
../escodegen/node_modules/esprima/bin/esparse.js
\ No newline at end of file
../esprima/bin/esvalidate.js
\ No newline at end of file
../escodegen/node_modules/esprima/bin/esvalidate.js
\ No newline at end of file
../handlebars/bin/handlebars
\ No newline at end of file
../js-beautify/js/bin/html-beautify.js
\ No newline at end of file
../jest-cli/bin/jest.js
\ No newline at end of file
../jest-runtime/bin/jest-runtime.js
\ No newline at end of file
../js-beautify/js/bin/js-beautify.js
\ No newline at end of file
../needle/bin/needle
\ No newline at end of file
../node-pre-gyp/bin/node-pre-gyp
\ No newline at end of file
../rc/cli.js
\ No newline at end of file
../sane/src/cli.js
\ No newline at end of file
../uglify-js/bin/uglifyjs
\ No newline at end of file
../uglify-es/bin/uglifyjs
\ No newline at end of file
../watch/cli.js
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"env": {
"browser": true,
"node": true
},
"globals": {
"chrome": true
},
"rules": {
"no-console": 0,
"no-empty": [1, { "allowEmptyCatch": true }]
},
"extends": "eslint:recommended"
}
sudo: false
language: node_js
node_js:
- "4"
- "6"
- "8"
install:
- make install
script:
- make lint
- make test
matrix:
include:
- node_js: '8'
env: BROWSER=1
This diff is collapsed.
# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
# BIN directory
BIN := $(THIS_DIR)/node_modules/.bin
# Path
PATH := node_modules/.bin:$(PATH)
SHELL := /bin/bash
# applications
NODE ?= $(shell which node)
YARN ?= $(shell which yarn)
PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
BROWSERIFY ?= $(NODE) $(BIN)/browserify
install: node_modules
browser: dist/debug.js
node_modules: package.json
@NODE_ENV= $(PKG) install
@touch node_modules
dist/debug.js: src/*.js node_modules
@mkdir -p dist
@$(BROWSERIFY) \
--standalone debug \
. > dist/debug.js
lint:
@eslint *.js src/*.js
test-node:
@istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
@cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
test-browser:
@$(MAKE) browser
@karma start --single-run
test-all:
@concurrently \
"make test-node" \
"make test-browser"
test:
@if [ "x$(BROWSER)" = "x" ]; then \
$(MAKE) test-node; \
else \
$(MAKE) test-browser; \
fi
clean:
rimraf dist coverage
.PHONY: browser install clean lint test test-all test-node test-browser
This diff is collapsed.
{
"name": "debug",
"version": "3.1.0",
"repository": {
"type": "git",
"url": "git://github.com/visionmedia/debug.git"
},
"description": "small debugging utility",
"keywords": [
"debug",
"log",
"debugger"
],
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
"Andrew Rhyne <rhyneandrew@gmail.com>"
],
"license": "MIT",
"dependencies": {
"ms": "2.0.0"