Skip to content

Commit

Permalink
Renamed test fixture folders to v2 & v3
Browse files Browse the repository at this point in the history
refs #144

- Renamed latest/canary folders to correspond to their spec versions instead of alliases
  • Loading branch information
naz committed Sep 6, 2019
1 parent 2cd82cd commit 05992d0
Show file tree
Hide file tree
Showing 61 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions test/001-deprecations.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ describe('001 Deprecations', function () {

describe('latest version:', function () {
it('[failure] theme is completely invalid (v1 and latest)', function (done) {
utils.testCheck(thisCheck, '001-deprecations/latest/invalid_all').then(function (output) {
utils.testCheck(thisCheck, '001-deprecations/v2/invalid_all').then(function (output) {
output.should.be.a.ValidThemeObject();

output.results.fail.should.be.an.Object().with.keys(
Expand Down Expand Up @@ -546,7 +546,7 @@ describe('001 Deprecations', function () {
});

it('[failure] theme is invalid for latest version', function (done) {
utils.testCheck(thisCheck, '001-deprecations/latest/invalid').then(function (output) {
utils.testCheck(thisCheck, '001-deprecations/v2/invalid').then(function (output) {
output.should.be.a.ValidThemeObject();

output.results.fail.should.be.an.Object().with.keys(
Expand Down Expand Up @@ -790,7 +790,7 @@ describe('001 Deprecations', function () {
});

it('[success] should show no error if no deprecated helpers used', function (done) {
utils.testCheck(thisCheck, '001-deprecations/latest/valid').then(function (output) {
utils.testCheck(thisCheck, '001-deprecations/v2/valid').then(function (output) {
output.should.be.a.ValidThemeObject();

output.results.fail.should.be.an.Object().which.is.empty();
Expand All @@ -801,7 +801,7 @@ describe('001 Deprecations', function () {
});

it('[mixed] should pass and fail when some rules pass and others fail', function (done) {
utils.testCheck(thisCheck, '001-deprecations/latest/mixed').then(function (output) {
utils.testCheck(thisCheck, '001-deprecations/v2/mixed').then(function (output) {
output.should.be.a.ValidThemeObject();

output.results.fail.should.be.an.Object().with.keys(
Expand Down Expand Up @@ -859,7 +859,7 @@ describe('001 Deprecations', function () {
const options = {checkVersion: 'canary'};

it('[failure] theme is completely invalid (canary)', function (done) {
utils.testCheck(thisCheck, '001-deprecations/canary/invalid_all', options).then(function (output) {
utils.testCheck(thisCheck, '001-deprecations/v3/invalid_all', options).then(function (output) {
output.should.be.a.ValidThemeObject();

output.results.fail.should.be.an.Object().with.keys(
Expand Down Expand Up @@ -1229,7 +1229,7 @@ describe('001 Deprecations', function () {
});

it('[failure] theme is invalid for canary version', function (done) {
utils.testCheck(thisCheck, '001-deprecations/canary/invalid', options).then(function (output) {
utils.testCheck(thisCheck, '001-deprecations/v3/invalid', options).then(function (output) {
output.should.be.a.ValidThemeObject();

output.results.fail.should.be.an.Object().with.keys(
Expand Down Expand Up @@ -1473,7 +1473,7 @@ describe('001 Deprecations', function () {
});

it('[success] should show no error if no deprecated helpers used', function (done) {
utils.testCheck(thisCheck, '001-deprecations/canary/valid', options).then(function (output) {
utils.testCheck(thisCheck, '001-deprecations/v3/valid', options).then(function (output) {
output.should.be.a.ValidThemeObject();

output.results.fail.should.be.an.Object().which.is.empty();
Expand All @@ -1484,7 +1484,7 @@ describe('001 Deprecations', function () {
});

it('[mixed] should pass and fail when some rules pass and others fail', function (done) {
utils.testCheck(thisCheck, '001-deprecations/canary/mixed', options).then(function (output) {
utils.testCheck(thisCheck, '001-deprecations/v3/mixed', options).then(function (output) {
output.should.be.a.ValidThemeObject();

output.results.fail.should.be.an.Object().with.keys(
Expand Down
4 changes: 2 additions & 2 deletions test/general.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ describe('format', function () {
});

it('sort by files', function (done) {
checker(themePath('001-deprecations/latest/invalid_all')).then((theme) => {
checker(themePath('001-deprecations/v2/invalid_all')).then((theme) => {
theme = format(theme, {sortByFiles: true});

theme.results.hasFatalErrors.should.be.true();
Expand All @@ -627,7 +627,7 @@ describe('format', function () {
});

it('formats for CLI output', function () {
return checker(themePath('001-deprecations/latest/invalid_all')).then((theme) => {
return checker(themePath('001-deprecations/v2/invalid_all')).then((theme) => {
theme = format(theme, {format: 'cli'});

theme.results.error[0].rule.should.equal('Replace \u001b[36m{{pageUrl}}\u001b[39m with \u001b[36m{{page_url}}\u001b[39m');
Expand Down

0 comments on commit 05992d0

Please sign in to comment.