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

test: resolve gtsRootDir in tests #158

Merged
merged 1 commit into from Jun 1, 2018

Conversation

ofrobots
Copy link
Contributor

@ofrobots ofrobots commented Jun 1, 2018

This ensures that the tests are independent of where they are run from.
Remove a test that was unnecessary.

This ensures that the tests are independent of where they are run from.
Remove unnecessary lint test. Improve lint tests to avoid passing in
lint config.
@codecov-io
Copy link

codecov-io commented Jun 1, 2018

Codecov Report

Merging #158 into master will decrease coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #158      +/-   ##
==========================================
- Coverage   96.67%   96.62%   -0.06%     
==========================================
  Files          10       10              
  Lines         331      326       -5     
  Branches       22       22              
==========================================
- Hits          320      315       -5     
  Misses         11       11
Impacted Files Coverage Δ
test/test-clean.ts 100% <ø> (ø) ⬆️
test/test-format.ts 100% <100%> (ø) ⬆️
test/test-lint.ts 100% <100%> (ø) ⬆️

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 86ffb3b...ea50344. Read the comment docs.

test.serial('createProgram should return an object', async t => {
await withFixtures({'tsconfig.json': '{}'}, async () => {
const program = lint.createProgram(OPTIONS);
t.truthy(program);
});
});

// TODO: make the error friendlier. This error implies that our module messed
Copy link
Member

Choose a reason for hiding this comment

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

Why is this test deletec?

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 tests in this fine weren't fully thought through, and this one in particular wasn't needed. Instead of fixing the bug in lint.ts, the tests were always ensuring that there was a tslint.json in the specific test directory. This test was testing that the bug correctly existed 🤣.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, this should had said.. fix the bug in the OPTIONS object construction.

@ofrobots ofrobots merged commit 0fd3a2d into google:master Jun 1, 2018
@ofrobots ofrobots deleted the lint-gtsrootdir branch June 1, 2018 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants