Skip to content

Commit

Permalink
Merge branch 'master' into trim-whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmelnikow authored Apr 22, 2022
2 parents 5d16a67 + 8b82e6d commit 55c9957
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 91 deletions.
66 changes: 0 additions & 66 deletions core/server/public/monitor.html

This file was deleted.

23 changes: 23 additions & 0 deletions services/wordpress/wordpress-version-color.integration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { expect } from 'chai'
import { versionColorForWordpressVersion } from './wordpress-version-color.js'

describe('versionColorForWordpressVersion()', function () {
it('generates correct colours for given versions', async function () {
this.timeout(5e3)

expect(await versionColorForWordpressVersion('11.2.0')).to.equal(
'brightgreen'
)
expect(await versionColorForWordpressVersion('11.2')).to.equal(
'brightgreen'
)
expect(await versionColorForWordpressVersion('3.2.0')).to.equal('yellow')
expect(await versionColorForWordpressVersion('3.2')).to.equal('yellow')
expect(await versionColorForWordpressVersion('4.7-beta.3')).to.equal(
'yellow'
)
expect(await versionColorForWordpressVersion('cheese')).to.equal(
'lightgrey'
)
})
})
26 changes: 1 addition & 25 deletions services/wordpress/wordpress-version-color.spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { expect } from 'chai'
import {
toSemver,
versionColorForWordpressVersion,
} from './wordpress-version-color.js'
import { toSemver } from './wordpress-version-color.js'

describe('toSemver() function', function () {
it('coerces versions', function () {
Expand All @@ -13,24 +10,3 @@ describe('toSemver() function', function () {
expect(toSemver('foobar')).to.equal('foobar')
})
})

describe('versionColorForWordpressVersion()', function () {
it('generates correct colours for given versions', async function () {
this.timeout(5e3)

expect(await versionColorForWordpressVersion('11.2.0')).to.equal(
'brightgreen'
)
expect(await versionColorForWordpressVersion('11.2')).to.equal(
'brightgreen'
)
expect(await versionColorForWordpressVersion('3.2.0')).to.equal('yellow')
expect(await versionColorForWordpressVersion('3.2')).to.equal('yellow')
expect(await versionColorForWordpressVersion('4.7-beta.3')).to.equal(
'yellow'
)
expect(await versionColorForWordpressVersion('cheese')).to.equal(
'lightgrey'
)
})
})

0 comments on commit 55c9957

Please sign in to comment.