Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(SCSS): created skeleton for testing SCSS #1521

Merged
merged 2 commits into from
May 28, 2019

Conversation

shani-terminus
Copy link
Contributor

ISSUES CLOSED: #952

@shani-terminus
Copy link
Contributor Author

"testMatch" is the only change in the jest.config. the rest is conversion of " to '

@codecov
Copy link

codecov bot commented May 23, 2019

Codecov Report

Merging #1521 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1521   +/-   ##
=======================================
  Coverage   99.42%   99.42%           
=======================================
  Files         110      110           
  Lines        3803     3803           
  Branches      490      490           
=======================================
  Hits         3781     3781           
  Misses         22       22

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bafad5e...85f5870. Read the comment docs.

@codecov
Copy link

codecov bot commented May 23, 2019

Codecov Report

Merging #1521 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1521   +/-   ##
=======================================
  Coverage   99.42%   99.42%           
=======================================
  Files         110      110           
  Lines        3803     3803           
  Branches      521      490   -31     
=======================================
  Hits         3781     3781           
  Misses         22       22

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 47ff01d...17688d3. Read the comment docs.

@@ -0,0 +1,12 @@
/* eslint-disable no-undef */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the undefined item we are ignoring?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The True mixins: describe and test. I can probably make two one-liners, but it was useful having the whole doc when in discovery mode.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I wonder why this is needed but isn't needed in all the other files that use those two..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, figured out why this was happening. Our ESLint configuration sets the jest environment for files ending with spec or mock so it wasn't catching this new file naming convention. We can remove this ESLint comment by extending the overrides section of our ESLint configuration:

.eslintrc.js

module.exports = {
  "extends": ["@terminus/eslint-config-frontend/development"],
  "parserOptions": {
    "ecmaVersion": 6,
    "project": "./tsconfig.json",
    "sourceType": "module"
  },
  "rules": {
    "no-console": [
      "error",
      {
        "allow": [
          "warn"
        ]
      }
    ]
  },
  'overrides': [
    {
      'files': [
        '**/*.spec.ts',
        '**/*.mock.ts',
        '**/test-sass.js',
      ],
      'env': {
        'jest': true,
      },
    },
  ],
}

.eslintrc.ci.js

module.exports = {
  "extends": ["@terminus/eslint-config-frontend"],
  "parserOptions": {
    "ecmaVersion": 6,
    "project": "./tsconfig.json",
    "sourceType": "module"
  },
  "rules": {
    "no-console": [
      "error",
      {
        "allow": [
          "warn"
        ]
      }
    ]
  },
  'overrides': [
    {
      'files': [
        '**/*.spec.ts',
        '**/*.mock.ts',
        '**/test-sass.js',
      ],
      'env': {
        'jest': true,
      },
    },
  ],
}

@@ -0,0 +1,12 @@
/* eslint-disable no-undef */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make the configuration change so we can remove this comment.

Copy link
Contributor

@atlwendy atlwendy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 scss spec is new to me.


}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this commented out block for future reference?

@benjamincharity benjamincharity merged commit cde99e3 into master May 28, 2019
@benjamincharity benjamincharity deleted the 952-sass-unit-tests branch June 21, 2019 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SCSS: Add unit tests
3 participants