Skip to content

Commit

Permalink
Add Test Case for SSG Full Re-Export (#10864)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Mar 6, 2020
1 parent 1a9b49b commit f1d0e57
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/unit/babel-plugin-next-ssg-transform.test.js
Expand Up @@ -429,5 +429,15 @@ describe('babel plugin (next-ssg-transform)', () => {
`"class El extends React.Component{render(){return __jsx(\\"div\\",null);}}const a=5;export var __N_SSG=true;export{El as default,a};"`
)
})

it('should support full re-export', () => {
const output = babel(trim`
export { getStaticProps, default } from 'a'
`)

expect(output).toMatchInlineSnapshot(
`"export var __N_SSG=true;export{default}from'a';"`
)
})
})
})

0 comments on commit f1d0e57

Please sign in to comment.