hunk.code_window:       - name: Build
           run: CI='' pnpm build:widget
         # Runs a single command using the runners shell
         - name: Start Client
           run: pnpm start:widget &
         # Runs a single command using the runners shell
         - name: Start WS
  
hunk.labels: keep keep keep keep keep replace keep keep keep
hunk.after_edit:         run: pnpm start:widget:test &
  
hunk.file_path: .github/workflows/test-widget.yml
hunk.type: replace
file: import { SNSClient } from '@aws-sdk/client-sns';
  
  import { SNSSmsProvider } from './sns.provider';
  
  test('should trigger sns library correctly', async () => {
    const mockResponse = { MessageId: 'mock-message-id' };
    const spy = jest
      .spyOn(SNSClient.prototype, 'send')
      .mockImplementation(async () => mockResponse);
  
    const mockConfig = {
      accessKeyId: 'TEST',
      secretAccessKey: 'TEST',
      region: 'test-1',
    };
    const provider = new SNSSmsProvider(mockConfig);
  
    const mockNotifireMessage = {
      to: '0123456789',
      content: 'hello',
    };
    const response = await provider.sendMessage(mockNotifireMessage);
  
    const publishInput = {
      input: {
        PhoneNumber: mockNotifireMessage.to,
        Message: mockNotifireMessage.content,
      },
    };
  
    expect(spy).toHaveBeenCalled();
    expect(spy).toHaveBeenCalledWith(expect.objectContaining(publishInput));
    expect(response.id).toBe(mockResponse.MessageId);
  });
  