1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
Description: Switch test from ava to tape
There are too many missing dependencies to enable upstream test,
however I keep this patch in source dir for later use.
NB: unpatched tests succeed with ava.
Author: Xavier Guimard <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2019-08-12
--- a/test/err/index.js
+++ b/test/err/index.js
@@ -4,14 +4,15 @@
'use strict'
-var test = require('ava')
+var test = require('tape')
var optionsrc = require('../..')
test('No Config - {Error} - Load Options', function (t) {
optionsrc().then(function (config) {
- t.is(config.options, {})
+ //t.is(config.options, {})
- t.is(config.file, '')
+ t.equal(config.file, '')
+ t.end();
})
})
--- a/test/js/index.js
+++ b/test/js/index.js
@@ -4,7 +4,7 @@
'use strict'
-var test = require('ava')
+var test = require('tape')
var path = require('path')
var read = require('fs').readFileSync
@@ -24,16 +24,18 @@
var ctx = { map: 'inline' }
optionsrc(ctx, 'test/js').then(function (options) {
- t.is(options.parser, require('sugarss'))
- t.is(options.syntax, require('postcss-scss'))
- t.is(options.map, 'inline')
- t.is(options.from, './test/js/fixtures/index.css')
- t.is(options.to, './test/js/expect/index.css')
+ t.deepEqual(options.options.parser, require('sugarss'))
+ t.deepEqual(options.options.syntax, require('postcss-scss'))
+ t.equal(options.options.map, 'inline')
+ t.equal(options.options.from, './test/js/fixtures/index.css')
+ t.equal(options.options.to, './test/js/expect/index.css')
- t.is(options.file, path.resolve('test/js/postcss.config.js'))
+ t.equal(options.file, path.resolve('test/js/postcss.config.js'))
+ t.end();
})
})
+/*
test('postcss.config.js - {Function} - Process SSS', function (t) {
optionsrc({}, 'test/js').then(function (options) {
postcss([])
@@ -55,3 +57,4 @@
})
})
})
+*/
--- a/test/pkg/index.js
+++ b/test/pkg/index.js
@@ -4,7 +4,7 @@
'use strict'
-var test = require('ava')
+var test = require('tape')
var path = require('path')
var read = require('fs').readFileSync
@@ -22,16 +22,18 @@
test('package.json - {Object} - Load Options', function (t) {
optionsrc({}, 'test/pkg').then(function (options) {
- t.is(options.parser, require('sugarss'))
- t.is(options.syntax, require('postcss-scss'))
- t.is(options.map, false)
- t.is(options.from, './test/pkg/fixtures/index.css')
- t.is(options.to, './test/pkg/expect/index.css')
+ t.deepEqual(options.options.parser, require('sugarss'))
+ t.deepEqual(options.options.syntax, require('postcss-scss'))
+ t.equal(options.options.map, false)
+ t.equal(options.options.from, './test/pkg/fixtures/index.sss')
+ t.equal(options.options.to, './test/pkg/expect/index.css')
- t.is(options.file, path.resolve('test/pkg/package.json'))
+ t.equal(options.file, path.resolve('test/pkg/package.json'))
+ t.end();
})
})
+/*
test('package.json - {Object} - Process SSS', function (t) {
optionsrc({}, 'test/pkg').then(function (options) {
postcss([])
@@ -53,3 +55,4 @@
})
})
})
+*/
|