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

feat: add unit tests for some functionality as a starter #4

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

yesudeep
Copy link

  • Upgrades TypeScript compiler version
  • Adds Jest for unit tests.
  • Formats source code
  • Adds alternative implementation for current formatting along with unit tests.

@yesudeep
Copy link
Author

Unit test results:

~/code/github.com/yesudeep/viz-sankey-marketplace (add-sample-unit-tests)
fish❯ bin/test

changed 1 package in 803ms
yarn run v1.22.19
$ jest
 PASS  src/currency_formatter.test.ts
  fromSheetsToD3Format
    ✓ should sanitize the format correctly (3 ms)
    ✓ should return empty string when no value format provided unlike original implementation
  getCurrencySymbol
    ✓ should obtain the correct currency symbol
  getFormatSpan
    ✓ should obtain the span of the format if available (1 ms)
  getFormatSuffix
    ✓ should obtain the correct formatting suffix (1 ms)
  getGroupingSymbol
    ✓ should obtain the grouping delimiter (1 ms)

Test Suites: 1 passed, 1 total
Tests:       6 passed, 6 total
Snapshots:   0 total
Time:        2.002 s
Ran all test suites.
Done in 2.84s.

- [ ] Upgrades TypeScript compiler version
- [ ] Adds Jest for unit tests.
- [ ] Formats source code
- [ ] Adds alternative implementation for current formatting along with unit tests.
@yesudeep yesudeep force-pushed the add-sample-unit-tests branch from d43e220 to bdf904c Compare July 11, 2023 00:56
@tanyasingh1902
Copy link

LGTM

@yjmg yjmg merged commit 6bcb124 into looker-open-source:master Jul 11, 2023
elivillalejos added a commit that referenced this pull request Dec 19, 2024
🤖 I have created a release *beep* *boop*
---


## 1.0.0 (2024-12-13)


### Features

* add unit tests for some functionality as a starter
([#4](#4))
([6bcb124](6bcb124))
* Adds ci implementation
([#15](#15))
([ad37f68](ad37f68))


### Bug Fixes

* Update [@loader-utils](https://github.com/loader-utils) to remove
[@babel-loader](https://github.com/babel-loader) vulnerability
([#23](#23))
([6eb5eb5](6eb5eb5))
* Updates @babel/core to remove @babel/traverse vulnerability
([#20](#20))
([eed3ef1](eed3ef1))
* updating dependencies to fix ci build node version error
([#40](#40))
([822977e](822977e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: Cinthia Elizabeth Villalejos Zamora <villalejos@google.com>
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.

3 participants