less-test.js (less.js-4.1.2) | : | less-test.js (less.js-4.1.3) | ||
---|---|---|---|---|
skipping to change at line 565 | skipping to change at line 565 | |||
const expected = 'h1 {\n color: red;\n}\n'; | const expected = 'h1 {\n color: red;\n}\n'; | |||
if (css !== expected) { | if (css !== expected) { | |||
difference('FAIL', expected, css); | difference('FAIL', expected, css); | |||
return; | return; | |||
} | } | |||
nockScope.done(); | nockScope.done(); | |||
ok('OK'); | ok('OK'); | |||
}; | }; | |||
} | } | |||
function testDisablePluginRule() { | ||||
less.render( | ||||
'@plugin "../../plugin/some_plugin";', | ||||
{disablePluginRule: true}, | ||||
function(err) { | ||||
// TODO: Need a better way of identifing exactly which error is | ||||
thrown. Checking | ||||
// text like this tends to be rather brittle. | ||||
const EXPECTED = '@plugin statements are not allowed when disabl | ||||
ePluginRule is set to true'; | ||||
if (!err || String(err).indexOf(EXPECTED) < 0) { | ||||
fail('ERROR: Expected "' + EXPECTED + '" error'); | ||||
return; | ||||
} | ||||
ok(stylize('OK\n', 'green')); | ||||
} | ||||
); | ||||
} | ||||
return { | return { | |||
runTestSet: runTestSet, | runTestSet: runTestSet, | |||
runTestSetNormalOnly: runTestSetNormalOnly, | runTestSetNormalOnly: runTestSetNormalOnly, | |||
testSyncronous: testSyncronous, | testSyncronous: testSyncronous, | |||
testErrors: testErrors, | testErrors: testErrors, | |||
testTypeErrors: testTypeErrors, | testTypeErrors: testTypeErrors, | |||
testSourcemap: testSourcemap, | testSourcemap: testSourcemap, | |||
testSourcemapWithoutUrlAnnotation: testSourcemapWithoutUrlAnnotation, | testSourcemapWithoutUrlAnnotation: testSourcemapWithoutUrlAnnotation, | |||
testImports: testImports, | testImports: testImports, | |||
testImportRedirect: testImportRedirect, | testImportRedirect: testImportRedirect, | |||
testEmptySourcemap: testEmptySourcemap, | testEmptySourcemap: testEmptySourcemap, | |||
testNoOptions: testNoOptions, | testNoOptions: testNoOptions, | |||
testDisablePluginRule: testDisablePluginRule, | ||||
testJSImport: testJSImport, | testJSImport: testJSImport, | |||
finished: finished | finished: finished | |||
}; | }; | |||
}; | }; | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 20 lines changed or added |