Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
luis-almeida committed May 2, 2023
1 parent 9f3c5f9 commit 1757751
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/zcli-themes/src/lib/getAssets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('getAssets', () => {
])
})

it('throws and error when an asset has illegal characters in its name', () => {
it('throws an error when an asset has illegal characters in its name', () => {
const existsSyncStub = sinon.stub(fs, 'existsSync')
const readdirSyncStub = sinon.stub(fs, 'readdirSync')

Expand Down
4 changes: 2 additions & 2 deletions packages/zcli-themes/src/lib/getManifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('getManifest', () => {
expect(getManifest('theme/path')).to.deep.equal(manifest)
})

it('throws and error when it can\'t find a manifest.json file', () => {
it('throws an error when it can\'t find a manifest.json file', () => {
const existsSyncStub = sinon.stub(fs, 'existsSync')

existsSyncStub
Expand All @@ -43,7 +43,7 @@ describe('getManifest', () => {
}).to.throw('Couldn\'t find a manifest.json file at path: "theme/path/manifest.json"')
})

it('throws and error when the manifest.json file is malformed', () => {
it('throws an error when the manifest.json file is malformed', () => {
const existsSyncStub = sinon.stub(fs, 'existsSync')
const readFileSyncStub = sinon.stub(fs, 'readFileSync')

Expand Down
2 changes: 1 addition & 1 deletion packages/zcli-themes/src/lib/getRuntimeContext.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('getRuntimeContext', () => {
username: '[email protected]'
})

it('throws and error when the config file is malformed', () => {
it('throws an error when the config file is malformed', () => {
const existsSyncStub = sinon.stub(fs, 'existsSync')
const readFileSyncStub = sinon.stub(fs, 'readFileSync')

Expand Down
2 changes: 1 addition & 1 deletion packages/zcli-themes/src/lib/getVariables.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ describe('getVariables', () => {

expect(() => {
getVariables('theme/path', settings, context)
}).to.throw('The setting "favicon" of type "file" does not a matching file within the "settings" folder')
}).to.throw('The setting "favicon" of type "file" does not have a matching file within the "settings" folder')
})
})
2 changes: 1 addition & 1 deletion packages/zcli-themes/src/lib/getVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function getVariables (themePath: string, settings: Setting[], co
const file = filenames.find(filename => path.parse(filename).name === variable.identifier)
if (!file) {
throw new CLIError(
`The setting "${variable.identifier}" of type "file" does not a matching file within the "settings" folder`
`The setting "${variable.identifier}" of type "file" does not have a matching file within the "settings" folder`
)
}
variable.value = file && `http://${context.host}:${context.port}/guide/settings/${file}`
Expand Down
2 changes: 1 addition & 1 deletion packages/zcli-themes/src/lib/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { CLIError } from '@oclif/core/lib/errors'

export const livereloadScript = (host: string, port: number) => `<script>(() => {
const socket = new WebSocket('ws://${host}:${port}/livereload');
socket.onopen = () => console.log('Listening to theme changes');
socket.onopen = () => console.log('Listening to theme changes...');
socket.onmessage = e => e.data === 'reload' && location.reload();
})()</script>
`
Expand Down
2 changes: 1 addition & 1 deletion packages/zcli-themes/src/lib/zass.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('zass', () => {
})

describe('variables', () => {
it('replaces all the instance of the variable with its value', () => {
it('replaces all instances of the variable with its value', () => {
const source = `
.header {
color: $font_color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
]
}
]
}
}
4 changes: 2 additions & 2 deletions packages/zcli-themes/tests/functional/preview.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('themes:preview', function () {
})

test
.it('should serve assets on de defined host and port', async () => {
.it('should serve assets on the defined host and port', async () => {
expect((await axios.get('http://0.0.0.0:9999/guide/style.css')).status).to.eq(200)
expect((await axios.get('http://0.0.0.0:9999/guide/script.js')).status).to.eq(200)
expect((await axios.get('http://0.0.0.0:9999/guide/settings/logo.png')).status).to.eq(200)
Expand All @@ -40,7 +40,7 @@ describe('themes:preview', function () {
})

test
.it('should watch for changes in the manifest.json', async () => {
.it('should watch for changes in the manifest.json file', async () => {
// Read manifest.json
const manifestPath = path.join(baseThemePath, 'manifest.json')
const manifest: Manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'))
Expand Down

0 comments on commit 1757751

Please sign in to comment.