結論
文字列であればなんでもいい場合は、 expect.any(String)
を使うのが便利。
test('〇〇の引数に文字列がセットされていること', () => { expect(mock).toHaveBeenCalledWith(expect.any(String)); });
文字列であればなんでもいい場合は、 expect.any(String)
を使うのが便利。
test('〇〇の引数に文字列がセットされていること', () => { expect(mock).toHaveBeenCalledWith(expect.any(String)); });