diff options
author | JohnAlbin <virtually.johnalbin@gmail.com> | 2016-04-30 10:35:52 +0300 |
---|---|---|
committer | JohnAlbin <virtually.johnalbin@gmail.com> | 2016-04-30 10:38:51 +0300 |
commit | 277a9be83d8dd1ff8fa72cb8c46c162cf935e1e9 (patch) | |
tree | 5d1e0399e49ab4a93f0d22dc8077eaf6920c0b46 /test | |
parent | d3bf5c2ae73b2538a4814fb5cfb05f3b59c19f4b (diff) |
Update eyeglass support to 0.8.0.
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/eyeglass/import-normalize/input.scss | 5 | ||||
-rw-r--r-- | test/fixtures/eyeglass/import-normalize/output.css | 2 | ||||
l--------- | test/fixtures/eyeglass/node_modules/normalize-scss | 1 | ||||
-rw-r--r-- | test/fixtures/eyeglass/package.json | 14 | ||||
-rw-r--r-- | test/test_eyeglass.js | 27 |
5 files changed, 49 insertions, 0 deletions
diff --git a/test/fixtures/eyeglass/import-normalize/input.scss b/test/fixtures/eyeglass/import-normalize/input.scss new file mode 100644 index 0000000..2116fa8 --- /dev/null +++ b/test/fixtures/eyeglass/import-normalize/input.scss @@ -0,0 +1,5 @@ +@import 'normalize'; + +.test { + @include normalize-rhythm(margin, 2); +} diff --git a/test/fixtures/eyeglass/import-normalize/output.css b/test/fixtures/eyeglass/import-normalize/output.css new file mode 100644 index 0000000..467a0a1 --- /dev/null +++ b/test/fixtures/eyeglass/import-normalize/output.css @@ -0,0 +1,2 @@ +.test { + margin: 3em; } diff --git a/test/fixtures/eyeglass/node_modules/normalize-scss b/test/fixtures/eyeglass/node_modules/normalize-scss new file mode 120000 index 0000000..11a54ed --- /dev/null +++ b/test/fixtures/eyeglass/node_modules/normalize-scss @@ -0,0 +1 @@ +../../../../
\ No newline at end of file diff --git a/test/fixtures/eyeglass/package.json b/test/fixtures/eyeglass/package.json new file mode 100644 index 0000000..5c2e359 --- /dev/null +++ b/test/fixtures/eyeglass/package.json @@ -0,0 +1,14 @@ +{ + "name": "eyeglass-test", + "version": "1.0.0", + "description": "A test of Eyeglass integration.", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "John Albin Wilkins <virtually.johnalbin@gmail.com> (http://john.albin.net/)", + "license": "GPL-2.0", + "dependencies": { + "normalize-scss": "*" + } +} diff --git a/test/test_eyeglass.js b/test/test_eyeglass.js new file mode 100644 index 0000000..adf2db4 --- /dev/null +++ b/test/test_eyeglass.js @@ -0,0 +1,27 @@ +'use strict'; + +var eyeglass = require('eyeglass'); +var sassyTest = new SassyTest({ + fixtures: path.join(__dirname, 'fixtures/eyeglass') +}); +var options = { + eyeglass: { + // Eyeglass will look in the root for a package.json. + root: sassyTest.fixture() + } +}; + +describe('Eyeglass integration tests', function() { + it('should fail to import Normalize without Eyeglass', function() { + return sassyTest.renderFixture('import-normalize').then(function() { + throw new Error('An error should have occurred'); + }).catch(function(error) { + expect(error).to.exist; + expect(error.message).to.include('File to import not found or unreadable: normalize'); + }); + }); + + it('should import Normalize with Eyeglass', function() { + return sassyTest.renderFixture('import-normalize', eyeglass(options)); + }); +}); |