Merge pull request #2489 from bassjobsen/browser-plugin-test

add browser postProcessor Plugin test
This commit is contained in:
Luke Page
2015-03-02 19:58:51 +00:00
6 changed files with 39 additions and 3 deletions

View File

@@ -251,13 +251,21 @@ module.exports = function (grunt) {
specs: 'test/browser/runner-postProcessor.js',
outfile: 'tmp/browser/test-runner-post-processor.html'
}
},
postProcessorPLugin: {
src: ['test/browser/less/postProcessorPlugin/*.less'],
options: {
helpers: 'test/browser/runner-postProcessorPlugin-options.js',
specs: 'test/browser/runner-postProcessorPlugin.js',
outfile: 'tmp/browser/test-runner-post-processor-plugin.html'
}
}
},
'saucelabs-jasmine': {
all: {
options: {
urls: ["post-processor", "global-vars", "modify-vars", "production", "rootpath-relative",
urls: ["post-processor-plugin","post-processor", "global-vars", "modify-vars", "production", "rootpath-relative",
"rootpath", "relative-urls", "browser", "no-js-errors", "legacy", "strict-units"
].map(function(testName) {
return "http://localhost:8081/tmp/browser/test-runner-" + testName + ".html";

View File

@@ -55,10 +55,10 @@
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-connect": "^0.9.0",
"grunt-contrib-jasmine": "^0.8.1",
"grunt-contrib-jasmine": "^0.8.2",
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-uglify": "^0.7.0",
"grunt-jscs": "^1.2.0",
"grunt-jscs": "^1.2.0",
"grunt-shell": "^1.1.1",
"grunt-browserify": "~3.3.0",
"matchdep": "^0.3.0",

View File

@@ -0,0 +1,4 @@
hr {height:50px;}
.test {
color: white;
}

View File

@@ -0,0 +1,4 @@
@color: white;
.test {
color: @color;
}

View File

@@ -0,0 +1,17 @@
var postProcessor = function() {};
postProcessor.prototype = {
process: function (css) {
return 'hr {height:50px;}\n' + css;
}
};
var postProcessorPlugin = {
install: function(less, pluginManager) {
pluginManager.addPostProcessor( new postProcessor());
}
};
var less = {logLevel: 4,
errorReporting: "console",
plugins: [postProcessorPlugin]};

View File

@@ -0,0 +1,3 @@
describe("less.js postProcessor Plugin", function() {
testLessEqualsInDocument();
});