summaryrefslogtreecommitdiff
path: root/packages/create-astro/test/utils.js
diff options
context:
space:
mode:
authorGravatar natemoo-re <natemoo-re@users.noreply.github.com> 2023-02-06 16:21:48 +0000
committerGravatar fredkbot <fred+astrobot@astro.build> 2023-02-06 16:21:48 +0000
commit6a59531ff9322b3a3fc288487148d77646a8ffc9 (patch)
tree24d6c99562a3abf8d5c179b13c1ffdb7bacb7ead /packages/create-astro/test/utils.js
parent8d2187d8b8587b2a3a0207d9ffa8667c43686436 (diff)
downloadastro-6a59531ff9322b3a3fc288487148d77646a8ffc9.tar.gz
astro-6a59531ff9322b3a3fc288487148d77646a8ffc9.tar.zst
astro-6a59531ff9322b3a3fc288487148d77646a8ffc9.zip
[ci] format
Diffstat (limited to 'packages/create-astro/test/utils.js')
-rw-r--r--packages/create-astro/test/utils.js24
1 files changed, 13 insertions, 11 deletions
diff --git a/packages/create-astro/test/utils.js b/packages/create-astro/test/utils.js
index c2cbb7245..ff5d5dd83 100644
--- a/packages/create-astro/test/utils.js
+++ b/packages/create-astro/test/utils.js
@@ -4,26 +4,28 @@ import stripAnsi from 'strip-ansi';
export function setup() {
const ctx = { messages: [] };
before(() => {
- setStdout(Object.assign({}, process.stdout, {
- write(buf) {
- ctx.messages.push(stripAnsi(String(buf)).trim())
- return true;
- }
- }))
+ setStdout(
+ Object.assign({}, process.stdout, {
+ write(buf) {
+ ctx.messages.push(stripAnsi(String(buf)).trim());
+ return true;
+ },
+ })
+ );
});
beforeEach(() => {
ctx.messages = [];
- })
+ });
return {
messages() {
- return ctx.messages
+ return ctx.messages;
},
length() {
- return ctx.messages.length
+ return ctx.messages.length;
},
hasMessage(content) {
- return !!ctx.messages.find(msg => msg.includes(content))
- }
+ return !!ctx.messages.find((msg) => msg.includes(content));
+ },
};
}