You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: worker_test.go
    path of file: ./repos/playwright-go/tests
    
    the code of the file until where you have to start completion: package playwright_test

import (
	"testing"

	"github.com/playwright-community/playwright-go"
	"github.com/stretchr/testify/require"
)

func TestWorkerShouldWork(t *testing.T) {
	BeforeEach(t)
	defer AfterEach(t)
	worker, err := page.ExpectWorker(func() error {
		_, err := page.Goto(server.PREFIX + "/worker/worker.html")
		return err
	})
	require.NoError(t, err)
	require.Equal(t, 1, len(page.Workers()))
	require.Equal(t, worker, page.Workers()[0])
    
func TestWorkershouldReportErrors(t *testing.T) {
	BeforeEach(t)
	defer AfterEach(t)
	errChan := make(chan error, 1)
	page.OnPageError(func(err error) {
		errChan <- err
	})

	_, err := page.Evaluate("() => new Worker(URL.createObjectURL(new Blob([`\n" +
		"  setTimeout(() => {\n" +
		"    // Do a console.log just to check that we do not confuse it with an error.\n" +
		"    console.log('hey');\n" +
		"    throw new Error('this is my error');\n" +
		"  })\n" +
		"`], {type: 'application/javascript'})))")
	require.NoError(t, err)
	pageError := <-errChan
	require.ErrorContains(t, pageError, "this is my error")
}