Compare commits

...

3 commits

Author SHA1 Message Date
Matthew Phillips
28e6af50e6 Don't run dev mode tests on windows 2021-12-23 13:14:06 -05:00
Matthew Phillips
f0dbe76b29 Update version in test due to releases GH 2021-12-23 12:21:25 -05:00
Matthew Phillips
186d98f8eb Run formatting on the release notes 2021-12-23 12:18:19 -05:00
8 changed files with 26 additions and 21 deletions

View file

@ -1029,10 +1029,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve
```js ```js
export default { export default {
markdownOptions: { markdownOptions: {
remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]],
rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]],
}, },
}; };
``` ```
@ -1052,10 +1052,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve
```js ```js
export default { export default {
name: '@matthewp/my-renderer', name: '@matthewp/my-renderer',
server: './server.js', server: './server.js',
client: './client.js', client: './client.js',
hydrationPolyfills: ['./my-polyfill.js'], hydrationPolyfills: ['./my-polyfill.js'],
}; };
``` ```

View file

@ -15,7 +15,7 @@ describe('Node builtins', () => {
const $ = cheerio.load(html); const $ = cheerio.load(html);
expect($('#version').text()).to.equal('1.2.0'); expect($('#version').text()).to.equal('1.2.0');
expect($('#dep-version').text()).to.equal('0.0.1'); expect($('#dep-version').text()).to.equal('0.1.0');
}); });
it('Can also be used with the non-prefixed version', async () => { it('Can also be used with the non-prefixed version', async () => {

View file

@ -1,6 +1,6 @@
import { expect } from 'chai'; import { expect } from 'chai';
import cheerio from 'cheerio'; import cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { describeIfNotWindows, loadFixture } from './test-utils.js';
let fixture; let fixture;
@ -75,7 +75,7 @@ describe('React Components', () => {
}); });
}); });
describe('dev', () => { describeIfNotWindows('dev', () => {
let devServer; let devServer;
before(async () => { before(async () => {

View file

@ -1,6 +1,6 @@
import { expect } from 'chai'; import { expect } from 'chai';
import cheerio from 'cheerio'; import cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { describeIfNotWindows, loadFixture } from './test-utils.js';
describe('Solid component', () => { describe('Solid component', () => {
let fixture; let fixture;
@ -29,7 +29,7 @@ describe('Solid component', () => {
}); });
}); });
describe('dev', () => { describeIfNotWindows('dev', () => {
let devServer; let devServer;
before(async () => { before(async () => {

View file

@ -1,6 +1,6 @@
import { expect } from 'chai'; import { expect } from 'chai';
import cheerio from 'cheerio'; import cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { describeIfNotWindows, loadFixture } from './test-utils.js';
describe('Svelte component', () => { describe('Svelte component', () => {
let fixture; let fixture;
@ -28,7 +28,7 @@ describe('Svelte component', () => {
}); });
}); });
describe('dev', () => { describeIfNotWindows('dev', () => {
let devServer; let devServer;
before(async () => { before(async () => {

View file

@ -6,6 +6,7 @@ import { loadConfig } from '../dist/core/config.js';
import dev from '../dist/core/dev/index.js'; import dev from '../dist/core/dev/index.js';
import build from '../dist/core/build/index.js'; import build from '../dist/core/build/index.js';
import preview from '../dist/core/preview/index.js'; import preview from '../dist/core/preview/index.js';
import os from 'os';
/** /**
* @typedef {import('node-fetch').Response} Response * @typedef {import('node-fetch').Response} Response
* @typedef {import('../src/core/dev/index').DevServer} DevServer * @typedef {import('../src/core/dev/index').DevServer} DevServer
@ -109,3 +110,7 @@ export function cli(/** @type {string[]} */ ...args) {
return spawned; return spawned;
} }
export const isWindows = os.platform() === 'win32';
export const describeIfNotWindows = isWindows ? describe.skip : describe;

View file

@ -1,6 +1,6 @@
import { expect } from 'chai'; import { expect } from 'chai';
import cheerio from 'cheerio'; import cheerio from 'cheerio';
import { loadFixture } from './test-utils.js'; import { describeIfNotWindows, loadFixture } from './test-utils.js';
describe('Vue component', () => { describe('Vue component', () => {
let fixture; let fixture;
@ -43,7 +43,7 @@ describe('Vue component', () => {
}); });
}); });
describe('dev', () => { describeIfNotWindows('dev', () => {
let devServer; let devServer;
before(async () => { before(async () => {

View file

@ -105,10 +105,10 @@
```js ```js
export default { export default {
markdownOptions: { markdownOptions: {
remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]],
rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]],
}, },
}; };
``` ```