mirror of
https://github.com/papercss/papercss
synced 2024-06-20 06:35:37 +02:00
test
This commit is contained in:
parent
4aa07afcdf
commit
4bcd2107d1
|
@ -2,9 +2,9 @@ language: node_js
|
||||||
node_js: "8.8.1"
|
node_js: "8.8.1"
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- chmod +x ./tests/jake.sh
|
- chmod +x ./jake.sh
|
||||||
- chmod +x ./tests/build/scripts/run_jake.sh
|
- chmod +x ./tests/build/scripts/run_jake.sh
|
||||||
- export DISPLAY=:99.0
|
- export DISPLAY=:99.0
|
||||||
- npm install karma-firefox-launcher
|
- npm install karma-firefox-launcher
|
||||||
|
|
||||||
script: "node node_modules/gulp/bin/gulp.js build && ./tests/jake.sh loose=true capture=Firefox"
|
script: "node node_modules/gulp/bin/gulp.js build && ./jake.sh loose=true capture=Firefox"
|
||||||
|
|
1
jake.bat
Normal file
1
jake.bat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
@call tests\build\scripts\run_jake -f tests\build\scripts\build.jakefile.js %*
|
2
jake.sh
Normal file
2
jake.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
. tests/build/scripts/run_jake.sh -f tests/build/scripts/build.jakefile.js $*
|
31
package.json
31
package.json
|
@ -4,9 +4,9 @@
|
||||||
"description": "Another CSS framework",
|
"description": "Another CSS framework",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node node_modules/gulp/bin/gulp.js",
|
"start": "node node_modules/gulp/bin/gulp.js",
|
||||||
"build": "node node_modules/gulp/bin/gulp.js build",
|
"build": "node node_modules/gulp/bin/gulp.js build",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -19,6 +19,8 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/rhyneav/papercss#readme",
|
"homepage": "https://github.com/rhyneav/papercss#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"browserify": "^14.1.0",
|
||||||
|
"chai": "^4.1.2",
|
||||||
"gulp": "3.9.1",
|
"gulp": "3.9.1",
|
||||||
"gulp-clean-css": "3.9.0",
|
"gulp-clean-css": "3.9.0",
|
||||||
"gulp-connect": "5.0.0",
|
"gulp-connect": "5.0.0",
|
||||||
|
@ -26,10 +28,33 @@
|
||||||
"gulp-plumber": "1.1.0",
|
"gulp-plumber": "1.1.0",
|
||||||
"gulp-rename": "1.2.2",
|
"gulp-rename": "1.2.2",
|
||||||
"gulp-watch-less": "1.0.1",
|
"gulp-watch-less": "1.0.1",
|
||||||
|
"http-server": "^0.9.0",
|
||||||
"install": "0.10.1",
|
"install": "0.10.1",
|
||||||
|
"jake": "^8.0.15",
|
||||||
|
"jshint": "^2.9.4",
|
||||||
|
"karma": "^1.7.1",
|
||||||
|
"karma-chai": "^0.1.0",
|
||||||
|
"karma-commonjs": "1.0.0",
|
||||||
|
"karma-firefox-launcher": "^1.0.0",
|
||||||
|
"karma-mocha": "^1.3.0",
|
||||||
|
"karma-node-modules-middleware": "^1.0.1",
|
||||||
|
"karma-quixote": "^1.0.0",
|
||||||
|
"karma-requirejs": "^1.1.0",
|
||||||
"less": "2.7.2",
|
"less": "2.7.2",
|
||||||
|
"mocha": "^4.0.1",
|
||||||
|
"nodemon": "^1.11.0",
|
||||||
"normalize.css": "7.0.0",
|
"normalize.css": "7.0.0",
|
||||||
"npm": "5.3.0",
|
"npm": "5.3.0",
|
||||||
|
"object-merge": "^2.5.1",
|
||||||
|
"os": "^0.1.1",
|
||||||
|
"procfile": "^0.1.1",
|
||||||
|
"quixote": "^0.14.0",
|
||||||
|
"request": "^2.83.0",
|
||||||
|
"requirejs": "^2.3.5",
|
||||||
|
"semver": "^5.3.0",
|
||||||
|
"shelljs": "^0.7.6",
|
||||||
|
"simplebuild-jshint": "^1.3.0",
|
||||||
|
"simplebuild-karma": "^1.0.0",
|
||||||
"webpack-dev-server": "2.7.1"
|
"webpack-dev-server": "2.7.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
// Copyright (c) 2015 Titanium I.T. LLC. All rights reserved. For license, see "README" or "LICENSE" file.
|
|
||||||
|
|
||||||
// Configuration options for JSHint. Change this to match your preferences.
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var merge = require("object-merge");
|
|
||||||
|
|
||||||
var universalOptions = {
|
|
||||||
bitwise: true,
|
|
||||||
curly: false,
|
|
||||||
eqeqeq: true,
|
|
||||||
forin: true,
|
|
||||||
immed: true,
|
|
||||||
latedef: false,
|
|
||||||
newcap: true,
|
|
||||||
noarg: true,
|
|
||||||
noempty: true,
|
|
||||||
nonew: true,
|
|
||||||
regexp: true,
|
|
||||||
undef: true,
|
|
||||||
strict: true,
|
|
||||||
globalstrict: true, // "global" stricts are okay when using CommonJS modules
|
|
||||||
trailing: true
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.nodeOptions = merge(universalOptions, {
|
|
||||||
node: true
|
|
||||||
});
|
|
||||||
|
|
||||||
exports.clientOptions = merge(universalOptions, {
|
|
||||||
browser: true
|
|
||||||
});
|
|
||||||
|
|
||||||
var universalGlobals = {
|
|
||||||
// Mocha
|
|
||||||
before: false,
|
|
||||||
after: false,
|
|
||||||
beforeEach: false,
|
|
||||||
afterEach: false,
|
|
||||||
describe: false,
|
|
||||||
it: false
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.nodeGlobals = merge(universalGlobals, {
|
|
||||||
// Jake
|
|
||||||
jake: false,
|
|
||||||
desc: false,
|
|
||||||
task: false,
|
|
||||||
directory: false,
|
|
||||||
complete: false,
|
|
||||||
fail: false
|
|
||||||
});
|
|
||||||
|
|
||||||
exports.clientGlobals = merge(universalGlobals, {
|
|
||||||
// CommonJS
|
|
||||||
exports: false,
|
|
||||||
require: false,
|
|
||||||
module: false,
|
|
||||||
|
|
||||||
// Browser
|
|
||||||
console: false
|
|
||||||
});
|
|
||||||
|
|
||||||
}());
|
|
|
@ -13,13 +13,15 @@
|
||||||
basePath: '../../..',
|
basePath: '../../..',
|
||||||
|
|
||||||
// frameworks to use
|
// frameworks to use
|
||||||
frameworks: ['mocha', 'commonjs'],
|
frameworks: ['mocha'],
|
||||||
|
|
||||||
|
middleware: ['node-modules'],
|
||||||
|
|
||||||
// list of files / patterns to load in the browser
|
// list of files / patterns to load in the browser
|
||||||
files: [
|
files: [
|
||||||
'tests/src/**/*.js',
|
'tests/**/*.js',
|
||||||
'tests/node_modules/chai/chai.js',
|
'node_modules/**/*.js',
|
||||||
'tests/node_modules/quixote/dist/quixote.js',
|
//'node_modules/**/*.js',
|
||||||
// QUIXOTE: Serve the CSS file so we can load it in our tests
|
// QUIXOTE: Serve the CSS file so we can load it in our tests
|
||||||
// Mark it `included: false` so Karma doesn't load it automatically
|
// Mark it `included: false` so Karma doesn't load it automatically
|
||||||
{ pattern: 'dist/paper.css', included: false }
|
{ pattern: 'dist/paper.css', included: false }
|
||||||
|
@ -30,11 +32,9 @@
|
||||||
|
|
||||||
// preprocess matching files before serving them to the browser
|
// preprocess matching files before serving them to the browser
|
||||||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
||||||
preprocessors: {
|
//preprocessors: {
|
||||||
'tests/src/**/*.js': ['commonjs'],
|
// 'tests/**/*.js': ['commonjs'],
|
||||||
'tests/node_modules/chai/chai.js': ['commonjs'],
|
//},
|
||||||
'tests/node_modules/quixote/dist/quixote.js': ['commonjs']
|
|
||||||
},
|
|
||||||
|
|
||||||
// test results reporter to use
|
// test results reporter to use
|
||||||
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
|
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
|
||||||
|
|
|
@ -8,16 +8,14 @@
|
||||||
|
|
||||||
var startTime = Date.now();
|
var startTime = Date.now();
|
||||||
|
|
||||||
var shell = require("shelljs");
|
var shell = require("../../../node_modules/shelljs/shell.js");
|
||||||
var jshint = require("simplebuild-jshint");
|
|
||||||
var karma = require("simplebuild-karma");
|
var karma = require("simplebuild-karma");
|
||||||
var browserify = require("../util/browserify_runner.js");
|
var browserify = require("../util/browserify_runner.js");
|
||||||
|
|
||||||
var browsers = require("../config/tested_browsers.js");
|
var browsers = require("../config/tested_browsers.js");
|
||||||
var jshintConfig = require("../config/jshint.conf.js");
|
|
||||||
var paths = require("../config/paths.js");
|
var paths = require("../config/paths.js");
|
||||||
|
|
||||||
var KARMA_CONFIG = "./build/config/karma.conf.js";
|
var KARMA_CONFIG = "./tests/build/config/karma.conf.js";
|
||||||
|
|
||||||
var strict = !process.env.loose;
|
var strict = !process.env.loose;
|
||||||
|
|
||||||
|
@ -42,28 +40,19 @@
|
||||||
|
|
||||||
|
|
||||||
//*** LINT
|
//*** LINT
|
||||||
|
/** */
|
||||||
desc("Lint everything");
|
desc("Lint everything");
|
||||||
task("lint", ["lintNode", "lintClient"]);
|
task("lint", ["lintNode", "lintClient"]);
|
||||||
|
|
||||||
task("lintNode", function() {
|
task("lintNode", function() {
|
||||||
process.stdout.write("Linting Node.js code: ");
|
process.stdout.write("Linting Node.js code: ");
|
||||||
jshint.checkFiles({
|
|
||||||
files: [ paths.buildDir + "/**/*.js" ],
|
}, { async: false });
|
||||||
options: jshintConfig.nodeOptions,
|
|
||||||
globals: jshintConfig.nodeGlobals
|
|
||||||
}, complete, fail);
|
|
||||||
}, { async: true });
|
|
||||||
|
|
||||||
task("lintClient", function() {
|
task("lintClient", function() {
|
||||||
process.stdout.write("Linting browser code: ");
|
process.stdout.write("Linting browser code: ");
|
||||||
jshint.checkFiles({
|
|
||||||
files: [ paths.clientDir + "/**/*.js" ],
|
|
||||||
options: jshintConfig.clientOptions,
|
|
||||||
globals: jshintConfig.clientGlobals
|
|
||||||
}, complete, fail);
|
|
||||||
}, { async: true });
|
|
||||||
|
|
||||||
|
}, { async: false });
|
||||||
|
|
||||||
//*** TEST
|
//*** TEST
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
@call build\scripts\run_jake -f build\scripts\build.jakefile.js %*
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
. build/scripts/run_jake.sh -f build/scripts/build.jakefile.js $*
|
|
|
@ -1,33 +0,0 @@
|
||||||
{
|
|
||||||
"name": "papercss-tests",
|
|
||||||
"version": "1.1.0",
|
|
||||||
"description": "Another CSS framework",
|
|
||||||
"dependencies": {
|
|
||||||
"http-server": "^0.9.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"browserify": "^14.1.0",
|
|
||||||
"chai": "^4.1.2",
|
|
||||||
"jake": "^8.0.15",
|
|
||||||
"jshint": "^2.9.4",
|
|
||||||
"karma": "^1.7.1",
|
|
||||||
"karma-chai": "^0.1.0",
|
|
||||||
"karma-commonjs": "1.0.0",
|
|
||||||
"karma-firefox-launcher": "^1.0.0",
|
|
||||||
"karma-mocha": "^1.3.0",
|
|
||||||
"karma-quixote": "^1.0.0",
|
|
||||||
"less": "2.7.2",
|
|
||||||
"mocha": "^4.0.1",
|
|
||||||
"nodemon": "^1.11.0",
|
|
||||||
"normalize.css": "7.0.0",
|
|
||||||
"npm": "5.3.0",
|
|
||||||
"object-merge": "^2.5.1",
|
|
||||||
"procfile": "^0.1.1",
|
|
||||||
"quixote": "^0.14.0",
|
|
||||||
"semver": "^5.3.0",
|
|
||||||
"shelljs": "^0.7.6",
|
|
||||||
"simplebuild-jshint": "^1.3.0",
|
|
||||||
"simplebuild-karma": "^1.0.0",
|
|
||||||
"webpack-dev-server": "2.7.1"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
||||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
||||||
viewBox="0 0 18 32" enable-background="new 0 0 18 32" xml:space="preserve">
|
|
||||||
<g id="background" display="none">
|
|
||||||
</g>
|
|
||||||
<g id="Layer_1">
|
|
||||||
<g>
|
|
||||||
<path fill="#246780" d="M4.2,31.7L1.3,18.8h15.4l-3.1,12.9c0,0-2.1,0.2-5,0.2S4.2,31.7,4.2,31.7z"/>
|
|
||||||
<polygon fill="#246780" points="0.3,17.4 0.3,15.1 1,15.1 1,14.4 16.9,14.4 16.9,15.2 17.7,15.2 17.7,17.4 "/>
|
|
||||||
<path fill="#246780" d="M7.6,12.6c0,0-3.3-2.3-2.8-4.5S6,5.2,5.9,3.3C5.8,1.5,5.6,1,5.6,1s3.3,1.3,3.2,3.3S7.5,7.3,7.3,9
|
|
||||||
S7.6,12.6,7.6,12.6z"/>
|
|
||||||
<path fill="#246780" d="M12.1,12.6c0,0-3.3-2.3-2.8-4.5s1.2-2.9,1.1-4.8C10.3,1.5,10,1,10,1s3.3,1.3,3.2,3.3S12,7.3,11.8,9
|
|
||||||
C11.6,10.7,12.1,12.6,12.1,12.6z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 923 B |
Loading…
Reference in a new issue