test: await on expect().resolves/rejects

This commit is contained in:
Alois Klink
2024-09-17 21:13:55 +09:00
parent f12df395f8
commit 1892277273
2 changed files with 4 additions and 4 deletions

View File

@@ -130,8 +130,8 @@ describe('pie', () => {
expect(sections.get('bat')).toBe(40);
});
it('should handle simple pie with negative decimal', () => {
expect(async () => {
it('should handle simple pie with negative decimal', async () => {
await expect(async () => {
await parser.parse(`pie
"ash" : -60.67
"bat" : 40.12

View File

@@ -2063,8 +2063,8 @@ participant Alice`;
});
});
it.each(['__proto__', 'constructor'])('should allow %s as an actor name', function (prop) {
expect(
it.each(['__proto__', 'constructor'])('should allow %s as an actor name', async function (prop) {
await expect(
mermaidAPI.parse(`
sequenceDiagram
${prop}-->>A: Hello, how are you?`)