Permalink
Browse files

Adds tests. Updates README. Standard fixes

  • Loading branch information...
1 parent 3dcb9d9 commit 0ed5d80bb35455e89a6adc81d42bfe6e01d21b4c @zrrrzzt zrrrzzt committed Mar 19, 2017
Showing with 71 additions and 31 deletions.
  1. +2 −1 .gitignore
  2. +6 −9 README.md
  3. +10 −11 components/loading.js
  4. +1 −1 layouts/index.js
  5. +21 −9 package.json
  6. +7 −0 test/modules/ava-test.js
  7. +12 −0 test/modules/dependencies-test.js
  8. +12 −0 test/modules/dev-dependencies-test.js
View
@@ -1,7 +1,8 @@
# IDE
.idea
+.vscode
-# OS X
+# Mac OS
.DS_Store
# Logs
View
@@ -8,7 +8,7 @@ Website for five factor model of personality based on work from [IPIP-NEO-PI](ht
Tests and evaluation is gathered from [ipip.ori.org](http://ipip.ori.org).
-See it live @ https://bigfive.maccyber.io
+See it live @ [bigfive.world](https://bigfive.world)
Written in [nodejs](https://nodejs.org) using [next.js](https://github.com/zeit/next.js) framework and following [micro](https://github.com/zeit/micro) services:
* [micro-bigfive-questions](https://github.com/maccyber/micro-bigfive-questions) - *Serves questions*
@@ -38,13 +38,10 @@ npm run dev
```
Open web-browser at http://localhost:3000
-## Example
-See https://bigfive.maccyber.io (not finished)
-
## Deploy using [Now](https://zeit.co/now)
```sh
-$ now https://github.com/maccyber/bigfive-web
+$ now https://github.com/maccyber/bigfive-web --npm
```
## Deploy using [Docker](https://www.docker.com/)
@@ -66,16 +63,16 @@ npm run dev
## Screenshot
-![alt text](http://bildr.no/image/bkozazVQ.jpeg "BigFive")
+![BigFive screendump](http://bildr.no/image/bkozazVQ.jpeg "BigFive")
## License
[MIT](LICENSE)
## About
-Created by [zrrzzt](https://github.com/zrrrzzt) and [maccyber](https://github.com/maccyber)
+Created with <3 by [zrrzzt](https://github.com/zrrrzzt) and [maccyber](https://github.com/maccyber)
-![alt text](https://robots.kebabstudios.party/zrrrzzt.png "Robohash image of zrrrzzt")
-![alt text](https://robots.kebabstudios.party/maccyber.png "Robohash image of maccyber")
+![Robohash image of zrrrzzt](https://robots.kebabstudios.party/zrrrzzt.png "Robohash image of zrrrzzt")
+![Robohash image of maccyber](https://robots.kebabstudios.party/maccyber.png "Robohash image of maccyber")
View
@@ -4,21 +4,20 @@ export default ({ loading }) => (
<div>
{
loading
- ?
- <span className='loading'>
- <p>
- <img src='static/loading.svg' style={{width: 100}} />
- </p>
- <p>
- <big>LOADING ...</big></p>
- <style>
- {`
+ ? <span className='loading'>
+ <p>
+ <img src='static/loading.svg' style={{width: 100}} />
+ </p>
+ <p>
+ <big>LOADING ...</big></p>
+ <style>
+ {`
.loading {
text-align: center;
}
`}
- </style>
- </span>
+ </style>
+ </span>
: null
}
</div>
View
@@ -123,7 +123,7 @@ export default ({pageTitle, children}) => (
</div>
</div>
<div className='footer'>
- <a href='https://github.com/maccyber/bigfive-web'>Bigfive-web</a><br/>
+ <a href='https://github.com/maccyber/bigfive-web'>Bigfive-web</a><br />
Made with ❤ by <a href='https://github.com/zrrrzzt/'>zrrrzzt</a> and <a href='https://github.com/maccyber'>maccyber</a>
</div>
</div>
View
@@ -2,7 +2,8 @@
"name": "next-bigfive-web",
"version": "1.0.0",
"description": "Website for bigfive personality test using next.js",
- "license": "ISC",
+ "license": "MIT",
+ "private": true,
"author": {
"name": "Jonas Enge",
"email": "jonas.enge@gmail.com",
@@ -22,29 +23,40 @@
],
"repository": {
"type": "git",
- "url": "http://github.com/maccyber/bigfive-web.git"
+ "url": "https://github.com/maccyber/bigfive-web.git"
},
"bugs": {
- "url": "http://github.com/maccyber/bigfive-web/issues"
+ "url": "https://github.com/maccyber/bigfive-web/issues"
},
+ "homepage": "https://github.com/maccyber/bigfive-web",
"devDependencies": {
- "standard": "8.6.0"
+ "ava": "0.18.2",
+ "coveralls": "2.12.0",
+ "nsp": "2.6.3",
+ "nyc": "10.1.2",
+ "standard": "9.0.2"
},
"now": {
"alias": "bigfive.maccyber.io",
- "engines": {
- "node": "7.0.0"
- }
+ "env": {
+ "NODE_ENV": "production"
+ },
+ "type": "npm"
},
"scripts": {
"dev": "next",
"build": "next build",
- "start": "next start"
+ "start": "next start",
+ "test": "standard && nsp check && ava",
+ "test-offline": "standard && ava",
+ "coverage": "nyc ava",
+ "coveralls": "nyc ava && nyc report --reporter=lcov && cat coverage/lcov.info | coveralls",
+ "standard-fix": "standard --fix"
},
"dependencies": {
"axios": "0.15.3",
"country-list": "1.1.0",
- "next": "2.0.0-beta.27",
+ "next": "2.0.0-beta.39",
"react": "15.4.2",
"react-d3": "0.4.0",
"react-dom": "15.4.2"
View
@@ -0,0 +1,7 @@
+'use strict'
+
+const test = require('ava')
+
+test('ava works ok', t => {
+ t.true(true)
+})
@@ -0,0 +1,12 @@
+'use strict'
+
+const test = require('ava')
+const pkg = require('../../package.json')
+const dependencies = pkg.dependencies || {}
+
+Object.keys(dependencies).forEach((dependency) => {
+ test(`${dependency} loads ok`, t => {
+ const module = require(dependency)
+ t.truthy(module)
+ })
+})
@@ -0,0 +1,12 @@
+'use strict'
+
+const test = require('ava')
+const pkg = require('../../package.json')
+const dependencies = pkg.devDependencies || {}
+
+Object.keys(dependencies).forEach((dependency) => {
+ test(`${dependency} loads ok`, t => {
+ const module = require(dependency)
+ t.truthy(module)
+ })
+})

0 comments on commit 0ed5d80

Please sign in to comment.