mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
28 lines
727 B
JavaScript
28 lines
727 B
JavaScript
/* eslint-env jest */
|
|
import { imgSnapshotTest } from '../helpers/util.js'
|
|
const { toMatchImageSnapshot } = require('jest-image-snapshot')
|
|
|
|
expect.extend({ toMatchImageSnapshot })
|
|
|
|
describe('Sequencediagram', () => {
|
|
it('should render a simple class diagrams', async () => {
|
|
await imgSnapshotTest(page, `
|
|
classDiagram
|
|
Class01 <|-- AveryLongClass : Cool
|
|
Class03 *-- Class04
|
|
Class05 o-- Class06
|
|
Class07 .. Class08
|
|
Class09 --> C2 : Where am i?
|
|
Class09 --* C3
|
|
Class09 --|> Class07
|
|
Class07 : equals()
|
|
Class07 : Object[] elementData
|
|
Class01 : size()
|
|
Class01 : int chimp
|
|
Class01 : int gorilla
|
|
Class08 <--> C2: Cool label
|
|
`,
|
|
{})
|
|
})
|
|
})
|