Skip to content

Commit

Permalink
review-fix:goqzipcodeの処理をまとめたオブジェクトを外部化
Browse files Browse the repository at this point in the history
  • Loading branch information
marumoto-goq committed May 2, 2024
1 parent 9a33c30 commit bea387d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/test/checkLength.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect } from '@jest/globals';
import { goqZipCode } from './utils/goqZipCode';
import { goqZipCode } from './goqZipCode';

describe('郵便番号が期待する桁数かチェック', () => {
test('完全一致検索で入力データが7文字ならtrueを返す', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/test/convertHyphenatedZipCode.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect } from '@jest/globals';
import { goqZipCode } from './utils/goqZipCode';
import { goqZipCode } from './goqZipCode';

describe('オプションによってハイフンを付与', () => {
test('オプションでハイフンありを指定している場合、郵便番号にハイフンを追加する', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/test/convertZipCode.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect } from '@jest/globals';
import { goqZipCode } from './utils/goqZipCode';
import { goqZipCode } from './goqZipCode';

describe('convertZipCodeの動作をテスト', () => {
const expectedZipCodeExcludingHyphen = '7320021';
Expand Down
2 changes: 1 addition & 1 deletion src/test/utils/goqZipCode.ts → src/test/goqZipCode.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { HyphenatedZipCode } from '../type/type';
import type { HyphenatedZipCode } from './type/type';

export const goqZipCode = {
convertZipCode: function (testZipCode: string): string {
Expand Down

0 comments on commit bea387d

Please sign in to comment.