true

Sass unit tests

BSD-3-CLAUSE License

Downloads
63.6K
Stars
683
Committers
30

Bot releases are visible (Hide)

true - v8.0.0 Latest Release

Published by jgerigmeyer 8 months ago

  • FEATURE: Add True sass option (string or Sass implementation instance, defaults to 'sass') to allow using either sass or embedded-sass.
  • FEATURE: Add the Node.js package importer to the Sass importers option by default, if Dart Sass v1.71 or later is available. Users can opt out by providing their own importers option, e.g. { importers: [] }.
  • BREAKING: Drop support for node < 18
  • INTERNAL: Remove sass as a peer-dependency.
  • INTERNAL: Update dependencies

Full Changelog: https://github.com/oddbird/true/compare/v7.0.1...v8.0.0

true - v7.0.1

Published by jgerigmeyer 10 months ago

  • FEATURE: Validate runSass arguments and warn if using v6 API -- https://github.com/oddbird/true/pull/268
  • DOCUMENTATION: Add note that { style: 'compressed' } is not supported.
  • DOCUMENTATION: Add note about possible Jest error and workaround.
  • INTERNAL: Update dependencies

New Contributors

Full Changelog: https://github.com/oddbird/true/compare/v7.0.0...v7.0.1

true - v7.0.0

Published by jgerigmeyer almost 2 years ago

  • FEATURE: contains() checks multiple block with matching selectors. #243
  • BREAKING: Upgrade to newer Sass API
    • Add True sourceType option (path [default] or string)
    • Reverse order of expected arguments to runSass: 1) True options, 2) source path (or string), 3) optional Sass options
    • Note that some of the Sass options have changed. For example, includePaths is now loadPaths, outputStyle is now style, importer is now importers, etc. See the Dart Sass documentation for more details.
  • BREAKING: Require sass (>=1.45.0) as a peer-dependency, removing True sass option
  • BREAKING: Drop support for node < 14.15.0
  • INTERNAL: Use both Jest and Mocha for internal testing
  • INTERNAL: Remove documentation from npm package
  • INTERNAL: Update dependencies

Migrating from v6

  • runSass arguments have changed:

v6:

const path = require('path');
const sass = require('node-sass');
const sassTrue = require('sass-true');

const sassFile = path.join(__dirname, 'test.scss');
sassTrue.runSass(
  // Sass options [required]
  { file: sassFile, outputStyle: 'compressed', includePaths: ['node_modules'] },
  // True options [required]
  { describe, it, sass },
);

const sassString = `
h1 {
  font-size: 40px;
}`;
sassTrue.runSass(
  // Sass options [required]
  {
    data: sassString,
    outputStyle: 'compressed',
    includePaths: ['node_modules'],
  },
  // True options [required]
  { describe, it, sass },
);

v7:

const path = require('path');
const sassTrue = require('sass-true');

const sassFile = path.join(__dirname, 'test.scss');
sassTrue.runSass(
  // True options [required]
  { describe, it },
  // Sass source (path) [required]
  sassFile,
  // Sass options [optional]
  { style: 'compressed', loadPaths: ['node_modules'] },
);

const sassString = `
h1 {
  font-size: 40px;
}`;
sassTrue.runSass(
  // True options [required]
  { describe, it, sourceType: 'string' },
  // Sass source (string) [required]
  sassString,
  // Sass options [optional]
  { style: 'compressed', loadPaths: ['node_modules'] },
);

New Contributors

Full Changelog: https://github.com/oddbird/true/compare/v6.1.0...v7.0.0

true - v7.0.0-beta.0

Published by jgerigmeyer about 2 years ago

  • BREAKING: Upgrade to newer Sass API
    • Add True sourceType option (path [default] or string)
    • Reverse order of expected arguments to runSass: 1) True options, 2) source path (or string), 3) optional Sass options
  • BREAKING: Require sass as a peer-dependency, removing True sass option
  • BREAKING: Drop support for node < 14.15.0
  • INTERNAL: Use both Jest and Mocha for internal testing
  • INTERNAL: Update dependencies

Migrating from v6

  • runSass arguments have changed:

v6:

const path = require('path');
const sass = require('node-sass');
const sassTrue = require('sass-true');

const sassFile = path.join(__dirname, 'test.scss');
sassTrue.runSass(
  // Sass options [required]
  { file: sassFile, outputStyle: 'compressed' },
  // True options [required]
  { describe, it, sass },
);

const sassString = `
h1 {
  font-size: 40px;
}`;
sassTrue.runSass(
  // Sass options [required]
  { data: sassString, outputStyle: 'compressed' },
  // True options [required]
  { describe, it, sass },
);

v7:

const path = require('path');
const sassTrue = require('sass-true');

const sassFile = path.join(__dirname, 'test.scss');
sassTrue.runSass(
  // True options [required]
  { describe, it },
  // Sass source (path) [required]
  sassFile,
  // Sass options [optional]
  { style: 'compressed' },
);

const sassString = `
h1 {
  font-size: 40px;
}`;
sassTrue.runSass(
  // True options [required]
  { describe, it, sourceType: 'string' },
  // Sass source (string) [required]
  sassString,
  // Sass options [optional]
  { style: 'compressed' },
);

Full Changelog: https://github.com/oddbird/true/compare/v6.1.0...v7.0.0-beta.0

true - v6.1.0

Published by jgerigmeyer over 2 years ago

6.1.0 (03/02/22)

Full Changelog: https://github.com/oddbird/true/compare/v6.0.1...v6.1.0

true - v6.1.0-beta.1

Published by jgerigmeyer over 2 years ago

6.1.0-beta.1 (02/24/22)

  • FEATURE: Clearer formatting of failing test diffs #210
  • INTERNAL: Limit files included in npm package #189
  • INTERNAL: Convert JS to TypeScript and bundle type definitions #212 -- thanks to @robertmaier for the initial PR #206
  • INTERNAL: Remove documentation static-site from True repository
  • INTERNAL: Use Jest for internal testing (replaces Mocha)
  • INTERNAL: Switch from Travis CI to GitHub Actions for CI
  • INTERNAL: Update dependencies

Full Changelog: https://github.com/oddbird/true/compare/v6.0.1...v6.1.0-beta.1

true - Patch Docs & Eyeglass Versions

Published by mirisuzanne about 4 years ago

  • Remove eyeglass specific-version requirement
  • Update documentation
true - Move to Sass Modules (🚨Requires Dart Sass🚨)

Published by mirisuzanne about 4 years ago

  • 🚨 BREAKING: Switch to Dart Sass with Sass module system, dropping support for Node Sass.
  • 🚨 BREAKING: Drop support for node < 10
  • 🚨 BREAKING: Rename $true-terminal-output setting to $terminal-output when importing as a module (with @use). Projects not using Sass modules can still @import '<path>/sass-true/sass/true' and access the setting as $true-terminal-output
  • 🎉 FEATURE: Added _index.scss at the project root, for simpler import path: @use '<path>/sass-true'
  • 🎉 FEATURE: New sass/_throw.scss module provides:
    • error() function & mixin for establishing "catchable" errors
    • global $catch-errors toggles how error() output is handled
  • 🎉 FEATURE: Support testing content properties which include a curly brace.
  • 🛠 Update dependencies
true - Support for Dart Sass & Jest

Published by mirisuzanne over 5 years ago

  • BREAKING: Update API for runSass, which now accepts two arguments: a
    sassOptions object and a trueOptions object.
  • BREAKING: Drop support for node < 8
  • Add docs and testing for usage with Jest
    #135
  • Add sass option to runSass for passing a different Sass implementation
    than node-sass #137
  • Remove node-sass from peerDependencies
  • Fix deprecated use of assert.fail
    #138
  • Update dev dependencies
true - Dependency Changes

Published by jgerigmeyer over 6 years ago

v4.0.0 (04/09/18)

  • BREAKING: Move node-sass to peerDependencies
  • Update dependencies
  • Add JS coverage reporting
true - Feature: `contains()` mixin for output comparisons

Published by mirisuzanne over 6 years ago

  • NEW: Add contains() mixin for more minute output comparisons.
    Works the same as expect(), but doesn't require a complete match.
  • Update docs
true - Dependency Update

Published by mirisuzanne about 7 years ago

true - True 3.0!

Published by mirisuzanne about 7 years ago

(copied from 3-beta release notes…)

  • Added describe and it mixins,
    as alias for test-module and test respectively.
  • Added $inspect argument to assert-equal and assert-unequal mixins,
    for comparing inspect($assert) == inspect($expected)
    instead of $assert == $expected.
    This helps with several of the equality edge-cases listed below
    (rounding and units).
  • BREAKING: No more Ruby gem or Ruby CLI
  • BREAKING: No more bower package
  • BREAKING: Removes special-handling of equality,
    in favor of allowing Sass to determine the best comparisons.
    There are a few edge-cases to be aware of:
    • In some versions of Sass,
      manipulated numbers and colors are compared without rounding,
      so 1/3 != 0.333333 and lighten(#246, 15%) != #356a9f.
      Use the $inspect argument to compare rounded output values.
    • In all versions of Sass,
      unitless numbers are considered comparable to all units,
      so 1 == 1x where x represents any unit.
      Use the $inspect argument to compare output values with units.
    • Lists compare both values and delimiter,
      so (one two three) != (one, two, three).
      This can be particularly confusing for single-item lists,
      which still have a delimiter assigned,
      even though it is not used.
true - v3.0.0-beta.1

Published by mirisuzanne over 7 years ago

  • Added describe and it mixins,
    as alias for test-module and test respectively.
  • Added $inspect argument to assert-equal and assert-unequal mixins,
    for comparing inspect($assert) == inspect($expected)
    instead of $assert == $expected.
    This helps with several of the equality edge-cases listed below
    (rounding and units).
  • BREAKING: No more Ruby gem or Ruby CLI
  • BREAKING: No more bower package
  • BREAKING: Removes special-handling of equality,
    in favor of allowing Sass to determine the best comparisons.
    There are a few edge-cases to be aware of:
    • In some versions of Sass,
      manipulated numbers and colors are compared without rounding,
      so 1/3 != 0.333333 and lighten(#246, 15%) != #356a9f.
      Use the $inspect argument to compare rounded output values.
    • In all versions of Sass,
      unitless numbers are considered comparable to all units,
      so 1 == 1x where x represents any unit.
      Use the $inspect argument to compare output values with units.
    • Lists compare both values and delimiter,
      so (one two three) != (one, two, three).
      This can be particularly confusing for single-item lists,
      which still have a delimiter assigned,
      even though it is not used.
true -

Published by mirisuzanne over 7 years ago

true - Bug fixes & dependency updates

Published by mirisuzanne almost 8 years ago