forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve xAxis ticks, thinner bottom margin (apache#4756)
* Improve xAxis ticks, thinner bottom margin * Moving utils folder * Add isTruthy
- Loading branch information
1 parent
10fef4e
commit 997041e
Showing
13 changed files
with
213 additions
and
114 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
superset/assets/javascripts/SqlLab/components/CopyQueryTabUrl.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { it, describe } from 'mocha'; | ||
import { expect } from 'chai'; | ||
import { isTruthy } from '../../../javascripts/utils/common'; | ||
|
||
describe('utils/common', () => { | ||
describe('isTruthy', () => { | ||
it('evals false-looking strings properly', () => { | ||
expect(isTruthy('f')).to.equal(false); | ||
expect(isTruthy('false')).to.equal(false); | ||
expect(isTruthy('no')).to.equal(false); | ||
expect(isTruthy('n')).to.equal(false); | ||
expect(isTruthy('F')).to.equal(false); | ||
expect(isTruthy('False')).to.equal(false); | ||
expect(isTruthy('NO')).to.equal(false); | ||
expect(isTruthy('N')).to.equal(false); | ||
}); | ||
it('evals true-looking strings properly', () => { | ||
expect(isTruthy('t')).to.equal(true); | ||
expect(isTruthy('true')).to.equal(true); | ||
expect(isTruthy('yes')).to.equal(true); | ||
expect(isTruthy('y')).to.equal(true); | ||
expect(isTruthy('Y')).to.equal(true); | ||
expect(isTruthy('True')).to.equal(true); | ||
expect(isTruthy('Yes')).to.equal(true); | ||
expect(isTruthy('YES')).to.equal(true); | ||
}); | ||
it('evals bools properly', () => { | ||
expect(isTruthy(false)).to.equal(false); | ||
expect(isTruthy(true)).to.equal(true); | ||
}); | ||
it('evals ints properly', () => { | ||
expect(isTruthy(0)).to.equal(false); | ||
expect(isTruthy(1)).to.equal(true); | ||
}); | ||
it('evals constants properly', () => { | ||
expect(isTruthy(null)).to.equal(false); | ||
expect(isTruthy(undefined)).to.equal(false); | ||
}); | ||
it('string auto is false', () => { | ||
expect(isTruthy('false')).to.equal(false); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.