Permalink
Browse files

Refactor fixture tests.

  • Loading branch information...
1 parent 34ca2f3 commit 2ad9e47263efc6581dec1cd45ad1b2e20b9d49ab @ben-eb committed Oct 23, 2016
Showing with 389 additions and 257 deletions.
  1. +0 −3 .editorconfig
  2. +5 −3 src/__tests__/api.js
  3. +384 −16 src/__tests__/fixtures.js
  4. +0 −1 src/__tests__/fixtures/backgroundRepeatKeepSpaces.expected.css
  5. +0 −3 src/__tests__/fixtures/backgroundRepeatKeepSpaces.fixture.css
  6. +0 −1 src/__tests__/fixtures/cssMixins.expected.css
  7. +0 −8 src/__tests__/fixtures/cssMixins.fixture.css
  8. +0 −1 src/__tests__/fixtures/cssMixins2.expected.css
  9. +0 −19 src/__tests__/fixtures/cssMixins2.fixture.css
  10. +0 −1 src/__tests__/fixtures/dedupeCharset.expected.css
  11. +0 −11 src/__tests__/fixtures/dedupeCharset.fixture.css
  12. +0 −1 src/__tests__/fixtures/dedupeSelectors.expected.css
  13. +0 −7 src/__tests__/fixtures/dedupeSelectors.fixture.css
  14. +0 −1 src/__tests__/fixtures/dedupeSemicolons.expected.css
  15. +0 −4 src/__tests__/fixtures/dedupeSemicolons.fixture.css
  16. +0 −1 src/__tests__/fixtures/discardDuplicateKeyframes.expected.css
  17. +0 −21 src/__tests__/fixtures/discardDuplicateKeyframes.fixture.css
  18. +0 −1 src/__tests__/fixtures/handleVars.expected.css
  19. +0 −3 src/__tests__/fixtures/handleVars.fixture.css
  20. +0 −1 src/__tests__/fixtures/keepPaddingShorthand.expected.css
  21. +0 −18 src/__tests__/fixtures/keepPaddingShorthand.fixture.css
  22. +0 −1 src/__tests__/fixtures/normalizeUrl.expected.css
  23. +0 −3 src/__tests__/fixtures/normalizeUrl.fixture.css
  24. +0 −1 src/__tests__/fixtures/optimiseBackgroundGradients.expected.css
  25. +0 −3 src/__tests__/fixtures/optimiseBackgroundGradients.fixture.css
  26. +0 −1 src/__tests__/fixtures/optimiseBackgroundGradients2.expected.css
  27. +0 −6 src/__tests__/fixtures/optimiseBackgroundGradients2.fixture.css
  28. +0 −1 src/__tests__/fixtures/optimiseBorderLonghand.expected.css
  29. +0 −5 src/__tests__/fixtures/optimiseBorderLonghand.fixture.css
  30. +0 −1 src/__tests__/fixtures/optimiseBorderRadius.expected.css
  31. +0 −3 src/__tests__/fixtures/optimiseBorderRadius.fixture.css
  32. +0 −1 src/__tests__/fixtures/optimiseCombinators.expected.css
  33. +0 −11 src/__tests__/fixtures/optimiseCombinators.fixture.css
  34. +0 −1 src/__tests__/fixtures/optimiseDuration.expected.css
  35. +0 −11 src/__tests__/fixtures/optimiseDuration.fixture.css
  36. +0 −1 src/__tests__/fixtures/optimiseFontFace.expected.css
  37. +0 −13 src/__tests__/fixtures/optimiseFontFace.fixture.css
  38. +0 −1 src/__tests__/fixtures/optimiseIe9Hack.expected.css
  39. +0 −3 src/__tests__/fixtures/optimiseIe9Hack.fixture.css
  40. +0 −1 src/__tests__/fixtures/optimiseImportant.expected.css
  41. +0 −3 src/__tests__/fixtures/optimiseImportant.fixture.css
  42. +0 −1 src/__tests__/fixtures/optimiseMarginLonghand.expected.css
  43. +0 −6 src/__tests__/fixtures/optimiseMarginLonghand.fixture.css
  44. +0 −1 src/__tests__/fixtures/optimiseMarginLonghand2.expected.css
  45. +0 −6 src/__tests__/fixtures/optimiseMarginLonghand2.fixture.css
  46. +0 −1 src/__tests__/fixtures/optimiseMarginLonghand3.expected.css
  47. +0 −6 src/__tests__/fixtures/optimiseMarginLonghand3.fixture.css
  48. +0 −1 src/__tests__/fixtures/optimiseMarginShorthand.expected.css
  49. +0 −19 src/__tests__/fixtures/optimiseMarginShorthand.fixture.css
  50. +0 −1 src/__tests__/fixtures/optimisePaddingLonghand.expected.css
  51. +0 −6 src/__tests__/fixtures/optimisePaddingLonghand.fixture.css
  52. +0 −1 src/__tests__/fixtures/preserveCalcSpaces.expected.css
  53. +0 −3 src/__tests__/fixtures/preserveCalcSpaces.fixture.css
  54. +0 −1 src/__tests__/fixtures/reduceCalc.disabled.css
  55. +0 −1 src/__tests__/fixtures/reduceCalc.expected.css
  56. +0 −3 src/__tests__/fixtures/reduceCalc.fixture.css
  57. +0 −1 src/__tests__/fixtures/urlInsideString.expected.css
  58. +0 −3 src/__tests__/fixtures/urlInsideString.fixture.css
View
@@ -9,9 +9,6 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
-[tests/**/**.{disabled,expected}.css]
-insert_final_newline = false
-
[*.{json,yml}]
indent_size = 2
@@ -1,4 +1,3 @@
-import {readFileSync as read} from 'fs';
import postcss from 'postcss';
import ava from 'ava';
import nano from '..';
@@ -20,8 +19,11 @@ ava('can be used as a postcss plugin (2)', pluginMacro, postcss([nano()]));
ava('can be used as a postcss plugin (3)', pluginMacro, postcss(nano));
ava('can be used as a postcss plugin, with options', t => {
- const css = read(__dirname + '/fixtures/reduceCalc.fixture.css', 'utf-8');
- const exp = read(__dirname + '/fixtures/reduceCalc.disabled.css', 'utf-8');
+ const css = `
+ h1 {
+ width: calc(3px * 2 - 1px);
+ }`;
+ const exp = `h1{width:calc(3px * 2 - 1px)}`;
return postcss(nano({calc: false})).process(css).then(result => {
t.deepEqual(result.css, exp, specName('notTransformCalcProperty'));
Oops, something went wrong.

0 comments on commit 2ad9e47

Please sign in to comment.