mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-10-25 00:44:10 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			49 lines
		
	
	
		
			887 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			887 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import { imgSnapshotTest, renderGraph } from '../../helpers/util.ts';
 | |
| 
 | |
| describe('Requirement diagram', () => {
 | |
|   it('sample', () => {
 | |
|     imgSnapshotTest(
 | |
|       `
 | |
|     requirementDiagram
 | |
| 
 | |
|     requirement test_req {
 | |
|     id: 1
 | |
|     text: the test text.
 | |
|     risk: high
 | |
|     verifymethod: test
 | |
|     }
 | |
| 
 | |
|     functionalRequirement test_req2 {
 | |
|     id: 1.1
 | |
|     text: the second test text.
 | |
|     risk: low
 | |
|     verifymethod: inspection
 | |
|     }
 | |
| 
 | |
|     performanceRequirement test_req3 {
 | |
|     id: 1.2
 | |
|     text: the third test text.
 | |
|     risk: medium
 | |
|     verifymethod: demonstration
 | |
|     }
 | |
| 
 | |
|     element test_entity {
 | |
|     type: simulation
 | |
|     }
 | |
| 
 | |
|     element test_entity2 {
 | |
|     type: word doc
 | |
|     docRef: reqs/test_entity
 | |
|     }
 | |
| 
 | |
| 
 | |
|     test_entity - satisfies -> test_req2
 | |
|     test_req - traces -> test_req2
 | |
|     test_req - contains -> test_req3
 | |
|     test_req <- copies - test_entity2
 | |
|       `,
 | |
|       {}
 | |
|     );
 | |
|   });
 | |
| });
 | 
