how to write unit test case for following code snippet

export { className } from "path";  
export { className1} from "path";  
export { className2 } from "path";
export { className3 } from "path";

This file contains only the above lines, Should we write unit test cases for these kind of files, If yes,Please suggest how to write unit test cases for this.

Thanks in Advance

Upvotes: 0

Views: 149

Answers (1)

strdr4605
strdr4605

Reputation: 4352

There is no need to write tests for files that only exports something. If you have a coverageThreshold just ignore those files

// jest.config.js
module.exports = {
  ...
  collectCoverage: true,
  collectCoverageFrom: [
    'path/to/collect/**',
    '!path/to/ignore/**',
  ],
  coverageThreshold: {
    global: {
      ...
    },
  },
};

Upvotes: 1

Related Questions