Skip to content

Commit 8b0eff2

Browse files
committed
fix: Apply Prettier formatting to test file
1 parent cbe216e commit 8b0eff2

File tree

3 files changed

+22
-32
lines changed

3 files changed

+22
-32
lines changed

packages/faustwp-cli/tests/healthCheck/validateFaustEnvVars.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ describe('healthCheck/validateFaustEnvVars', () => {
7070
await validateFaustEnvVars();
7171

7272
expect(consoleLogSpy).toHaveBeenCalledWith(
73-
expect.stringContaining('Ensure your FAUST_SECRET_KEY environment variable matches your Secret Key'),
73+
expect.stringContaining(
74+
'Ensure your FAUST_SECRET_KEY environment variable matches your Secret Key',
75+
),
7476
);
7577

7678
consoleLogSpy.mockRestore();

packages/faustwp-cli/tests/healthCheck/validateNextWordPressUrl.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ describe('healthCheck/validateNextWordPressUrl', () => {
4949
await validateNextWordPressUrl();
5050
expect(consoleLogSpy).toHaveBeenCalledWith(
5151
expect.stringContaining('Validation Failed, Faust is shutting down:'),
52-
expect.stringContaining('Your Faust front-end site URL value is misconfigured'),
52+
expect.stringContaining(
53+
'Your Faust front-end site URL value is misconfigured',
54+
),
5355
);
5456
expect(mockExit).toHaveBeenCalledWith(1);
5557
expect(fetchMock).toHaveFetched(

packages/faustwp-core/tests/components/Toolbar/Toolbar.test.tsx

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,7 @@ test('renders a default list of nodes in the primary section if seedNode is not
126126
await waitFor(() => queryByAttribute('id', dom.container, 'wpadminbar'));
127127
const toolBars = screen.getAllByRole('list', { name: /toolbar/i });
128128
// Primary Toolbar
129-
testToolBarNode(
130-
toolBars[0],
131-
3,
132-
['WordPress', '', 'GraphiQL IDE'],
133-
);
129+
testToolBarNode(toolBars[0], 3, ['WordPress', '', 'GraphiQL IDE']);
134130
});
135131

136132
test('renders an Edit Post Node, in the primary section if seedNode is provided', async () => {
@@ -150,11 +146,7 @@ test('renders an Edit Post Node, in the primary section if seedNode is provided
150146
await waitFor(() => queryByAttribute('id', dom.container, 'wpadminbar'));
151147
const toolBars = screen.getAllByRole('list', { name: /toolbar/i });
152148
// Primary Toolbar
153-
testToolBarNode(
154-
toolBars[0],
155-
3,
156-
['WordPress', 'Edit Post', 'GraphiQL IDE'],
157-
);
149+
testToolBarNode(toolBars[0], 3, ['WordPress', 'Edit Post', 'GraphiQL IDE']);
158150
});
159151

160152
test('renders an Account Node in the secondary section', async () => {
@@ -172,11 +164,12 @@ test('renders an Account Node in the secondary section', async () => {
172164
await waitFor(() => queryByAttribute('id', dom.container, 'wpadminbar'));
173165
const toolBars = screen.getAllByRole('list', { name: /toolbar/i });
174166
// Secondary Toolbar
175-
testToolBarNode(
176-
toolBars[1],
177-
4,
178-
['Howdy, Edit ProfileLog Out', '', 'Edit Profile', 'Log Out'],
179-
);
167+
testToolBarNode(toolBars[1], 4, [
168+
'Howdy, Edit ProfileLog Out',
169+
'',
170+
'Edit Profile',
171+
'Log Out',
172+
]);
180173
});
181174

182175
test('renders an Edit Post Node, if seedNode is not provided and is preview', async () => {
@@ -196,11 +189,7 @@ test('renders an Edit Post Node, if seedNode is not provided and is preview', as
196189
await waitFor(() => queryByAttribute('id', dom.container, 'wpadminbar'));
197190
const toolBars = screen.getAllByRole('list', { name: /toolbar/i });
198191
// Primary Toolbar
199-
testToolBarNode(
200-
toolBars[0],
201-
3,
202-
['WordPress', 'Edit Post', 'GraphiQL IDE'],
203-
);
192+
testToolBarNode(toolBars[0], 3, ['WordPress', 'Edit Post', 'GraphiQL IDE']);
204193
});
205194

206195
test('does not render an Edit Post Node, if there is no seedNode and it is not a preview', async () => {
@@ -216,11 +205,7 @@ test('does not render an Edit Post Node, if there is no seedNode and it is not a
216205
await waitFor(() => queryByAttribute('id', dom.container, 'wpadminbar'));
217206
const toolBars = screen.getAllByRole('list', { name: /toolbar/i });
218207
// Primary Toolbar
219-
testToolBarNode(
220-
toolBars[0],
221-
3,
222-
['WordPress', '', 'GraphiQL IDE'],
223-
);
208+
testToolBarNode(toolBars[0], 3, ['WordPress', '', 'GraphiQL IDE']);
224209
});
225210

226211
test('Uses `toolbarNodes` hook to add nodes', async () => {
@@ -246,11 +231,12 @@ test('Uses `toolbarNodes` hook to add nodes', async () => {
246231
await waitFor(() => queryByAttribute('id', dom.container, 'wpadminbar'));
247232
const toolBars = screen.getAllByRole('list', { name: /toolbar/i });
248233
// Primary Toolbar
249-
testToolBarNode(
250-
toolBars[0],
251-
4,
252-
['WordPress', 'Edit Post', 'GraphiQL IDE', 'Test Node'],
253-
);
234+
testToolBarNode(toolBars[0], 4, [
235+
'WordPress',
236+
'Edit Post',
237+
'GraphiQL IDE',
238+
'Test Node',
239+
]);
254240
});
255241

256242
class TestAddToolbarNodePlugin {

0 commit comments

Comments
 (0)