Skip to content

Commit

Permalink
Unit test (opensearch-project#83)
Browse files Browse the repository at this point in the history
* feat: Change results number to displayed number

Signed-off-by: Mingkun Ma <[email protected]>

* Add babelrc config

Signed-off-by: Mingkun Ma <[email protected]>

Signed-off-by: Mingkun Ma <[email protected]>
Co-authored-by: Mingkun Ma <[email protected]>
  • Loading branch information
mingkunm and Mingkun Ma authored Nov 8, 2022
1 parent 86ad3ef commit 65cb2b1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": { "node": "10" }
}
],
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": [
"@babel/plugin-transform-modules-commonjs",
["@babel/plugin-transform-runtime", { "regenerator": true }],
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread"
]
}
5 changes: 1 addition & 4 deletions public/components/common_utils/__tests__/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

// TODO: Update unit test
const isNameValid = (name) => {
return name.length >= 50 || name.length === 0 ? false : true;
};
import { isNameValid } from '../utils';

describe('Utils helper functions', () => {
it('validates isNameValid function', () => {
Expand Down

0 comments on commit 65cb2b1

Please sign in to comment.