Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Jul 1, 2024
1 parent 460581c commit e079cf9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/renderToStream.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { describe, expect, it } from 'vitest'
import React from 'react'
import { Page } from './Page'
import { render } from './render'
import { partRegex } from '@brillout/part-regex'

describe('renderToStream()', async () => {
;(['node', 'web'] as const).forEach((streamType: 'node' | 'web') => {
Expand Down Expand Up @@ -44,9 +43,7 @@ describe('renderToStream()', async () => {
injectToStream('someChunk')
expect(1).toBe(2)
} catch (err) {
expect(err.message).toMatch(
partRegex`[react-streaming@${/[0-9]+/}.${/[0-9]+/}.${/[0-9]+/}][Wrong Usage] Cannot inject following chunk after stream has ended: \`someChunk\``,
)
expect(err.message).include('Cannot inject the following chunk because the stream has already ended')
}

{
Expand Down

0 comments on commit e079cf9

Please sign in to comment.