github-actions[bot]
3 years ago
committed by
GitHub
20 changed files with 76 additions and 42 deletions
@ -0,0 +1,12 @@ |
|||
name: ChainAlert |
|||
on: |
|||
schedule: |
|||
- cron: '0 0 * * *' |
|||
push: |
|||
branches: [ master ] |
|||
jobs: |
|||
chainalert: |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- uses: actions/checkout@v2 |
|||
- uses: checkmarx/chainalert-github-action@v1 |
@ -0,0 +1,17 @@ |
|||
import React from 'react'; |
|||
import { mount } from 'enzyme'; |
|||
import Input from '..'; |
|||
import { InputProps } from '../Input'; |
|||
|
|||
describe('Input types', () => { |
|||
it('should support data-attributes', () => { |
|||
const dataProps: InputProps = { |
|||
'data-test': 'test', |
|||
size: 'large', |
|||
}; |
|||
const wrapper = mount(<Input {...dataProps} />); |
|||
expect(wrapper.find('input').prop('data-test')).toBe('test'); |
|||
const wrapper2 = mount(<Input data-test="test" size="large" />); |
|||
expect(wrapper2.find('input').prop('data-test')).toBe('test'); |
|||
}); |
|||
}); |
Loading…
Reference in new issue