Browse Source

Remove babel

pull/19/head
Luke Childs 8 years ago
parent
commit
fdff2f9e99
  1. 1
      .gitignore
  2. 1
      .npmignore
  3. 21
      package.json
  4. 2
      test/Arguments should be able to be passed in in either order.js
  5. 2
      test/Existing falsey node globals don't get overwritten.js
  6. 2
      test/Existing node globals shouldn't get overwritten.js
  7. 2
      test/Function should overwrite DOM globals on each call.js
  8. 2
      test/Function should return window instance.js
  9. 2
      test/Function should setup browser environment.js
  10. 2
      test/Properties arg should set globals.js
  11. 2
      test/jsdom arg should set jsdom config.js

1
.gitignore

@ -1,4 +1,3 @@
node_modules
.nyc_output
dist
npm-debug.log

1
.npmignore

@ -1 +0,0 @@
src

21
package.json

@ -2,25 +2,11 @@
"name": "browser-env",
"version": "2.0.10",
"description": "Simulates a global browser environment using jsdom",
"main": "dist/index.js",
"main": "src/index.js",
"scripts": {
"prebuild": "rm -rf dist",
"build": "babel -d dist src",
"prebuild:map": "npm run prebuild",
"build:map": "babel --source-maps=true -d dist src",
"pretest": "npm run build:map",
"test": "nyc ava test",
"lint": "eslint src",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"prepublish": "npm run build"
},
"babel": {
"presets": [
"es2015"
],
"plugins": [
"add-module-exports"
]
"coverage": "nyc report --reporter=text-lcov | coveralls"
},
"eslintConfig": {
"extends": "lukechilds",
@ -52,9 +38,6 @@
},
"devDependencies": {
"ava": "^0.15.2",
"babel-cli": "^6.14.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-preset-es2015": "^6.9.0",
"coveralls": "^2.11.13",
"eslint": "^3.5.0",
"eslint-config-lukechilds": "^1.9.0",

2
test/Arguments should be able to be passed in in either order.js

@ -1,5 +1,5 @@
import test from 'ava';
import browserEnv from '../dist';
import browserEnv from '../src';
test(t => {
t.is(typeof navigator, 'undefined');

2
test/Existing falsey node globals don't get overwritten.js

@ -4,6 +4,6 @@ import test from 'ava';
// globals first
test(t => {
global.document = false;
require('../dist')();
require('../src')();
t.is(document, false);
});

2
test/Existing node globals shouldn't get overwritten.js

@ -1,5 +1,5 @@
import test from 'ava';
import browserEnv from '../dist';
import browserEnv from '../src';
test(t => {
const origConsole = console;

2
test/Function should overwrite DOM globals on each call.js

@ -1,5 +1,5 @@
import test from 'ava';
import browserEnv from '../dist';
import browserEnv from '../src';
test(t => {
t.is(typeof window, 'undefined');

2
test/Function should return window instance.js

@ -1,5 +1,5 @@
import test from 'ava';
import browserEnv from '../dist';
import browserEnv from '../src';
test(t => {
const returnValue = browserEnv();

2
test/Function should setup browser environment.js

@ -1,5 +1,5 @@
import test from 'ava';
import browserEnv from '../dist';
import browserEnv from '../src';
test(t => {
t.is(typeof window, 'undefined');

2
test/Properties arg should set globals.js

@ -1,5 +1,5 @@
import test from 'ava';
import browserEnv from '../dist';
import browserEnv from '../src';
test(t => {
t.is(typeof window, 'undefined');

2
test/jsdom arg should set jsdom config.js

@ -1,5 +1,5 @@
import test from 'ava';
import browserEnv from '../dist';
import browserEnv from '../src';
test(t => {
const userAgent = 'Custom user agent';

Loading…
Cancel
Save