From 063191d1dd08982e1c06a7d217114b84e7244a75 Mon Sep 17 00:00:00 2001 From: Mina Date: Sun, 6 Mar 2016 11:44:57 +0000 Subject: [PATCH] sets up DOM testing with es6 --- .babelrc | 2 +- .jshintrc | 4 ++++ package.json | 4 ++-- public/src/components/landing.jsx | 18 ++++++++++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 .jshintrc diff --git a/.babelrc b/.babelrc index a0765e1..2b93ed6 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,3 @@ { - "presets": ["es2015"] + "presets": ["react", "es2015"] } diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..98cf8d7 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,4 @@ +{ + "esversion": 6, + "node": true +} diff --git a/package.json b/package.json index 28a7e5e..40a1ac7 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "start": "node start.js", "dev": "webpack --progress --colors --inline & node start.js", "build": "webpack --watch", - "test": "node_modules/mocha/bin/mocha --compilers js:babel-core/register 'test/unit/**/*.@(js|jsx)'" + "test": "node_modules/mocha/bin/mocha --compilers js:babel-core/register --require ./test/test_helpers.js 'test/unit/**/*.@(js|jsx)'" }, "repository": { "type": "git", @@ -43,7 +43,7 @@ "babel-preset-react": "^6.5.0", "chai": "^3.4.1", "css-loader": "^0.23.1", - "jsdom": "^7.2.1", + "jsdom": "^7.2.2", "mocha": "^2.3.4", "node-sass": "^3.4.2", "nodemon": "^1.9.1", diff --git a/public/src/components/landing.jsx b/public/src/components/landing.jsx index ad9a93a..1fce198 100644 --- a/public/src/components/landing.jsx +++ b/public/src/components/landing.jsx @@ -1 +1,19 @@ 'use strict'; + +import React from 'react'; + +const Landing = React.createClass({ + + render () { + + return ( +
+

+ Home or Away? +

+
+ ); + } +}) + +export default Landing