Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lbebber committed Oct 3, 2019
1 parent 7029216 commit 89d81ac
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions react/__tests__/useCssHandles.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,24 @@ describe('useCssHandles', () => {
'vtex-app-2-x-element2 vtex-app-2-x-element2--blockClass vtex-previous-app-2-x-element2 vtex-previous-app-2-x-element2--blockClass vtex-previous-app-3-x-element2 vtex-previous-app-3-x-element2--blockClass',
})
})

it('doesnt repeat the migration if the current app happens to be the same as the migration one', () => {
const CSS_HANDLES = ['element1', 'element2']

const handles = useCssHandles(CSS_HANDLES, {
migrationFrom: [
'[email protected]',
'[email protected]',
'[email protected]',
],
})

expect(handles).toStrictEqual({
element1:
'vtex-app-2-x-element1 vtex-app-2-x-element1--blockClass vtex-previous-app-2-x-element1 vtex-previous-app-2-x-element1--blockClass vtex-previous-app-3-x-element1 vtex-previous-app-3-x-element1--blockClass',
element2:
'vtex-app-2-x-element2 vtex-app-2-x-element2--blockClass vtex-previous-app-2-x-element2 vtex-previous-app-2-x-element2--blockClass vtex-previous-app-3-x-element2 vtex-previous-app-3-x-element2--blockClass',
})
})
})
})

0 comments on commit 89d81ac

Please sign in to comment.