Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
Make tests respect eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Wood committed Sep 9, 2016
1 parent 18be40d commit 4b58009
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
/* eslint-env mocha */
/* eslint no-unused-expressions: off */

var fs = require('fs');
var path = require('path');
var expect = require('chai').expect;
var Plugin = require('./');

describe('Plugin', function() {
describe('Plugin', () => {
var plugin;

beforeEach(function() {
beforeEach(() => {
plugin = new Plugin({paths: {root: '.'}});
});

it('should be an object', function() {
it('should be an object', () => {
expect(plugin).to.be.ok;
});

it('should has #compile method', function() {
it('should has #compile method', () => {
expect(plugin.compile).to.be.an.instanceof(Function);
});

it('should compile and produce valid result', function(done) {
it('should compile and produce valid result', (done) => {
var content = '@color: #4D926F; #header {color: @color;}';
var expected = '#header {\n color: #4D926F;\n}\n';

Expand All @@ -28,7 +31,7 @@ describe('Plugin', function() {
}, error => expect(error).not.to.be.ok);
});

it('should handle invalid less gracefully', function(done) {
it('should handle invalid less gracefully', (done) => {
var content = '#header {color: @color;}';
var expected = 'NameError:variable @color is undefined in "style.less:1:16"';

Expand All @@ -38,7 +41,7 @@ describe('Plugin', function() {
});
});

it('should correctly identify stylesheet and data-uri dependencies', function(done) {
it('should correctly identify stylesheet and data-uri dependencies', (done) => {
var file = 'test-files/test-dependency-resolution.less';
var content = fs.readFileSync(path.join(__dirname, file));

Expand Down

0 comments on commit 4b58009

Please sign in to comment.