skip-ssr -> skip_if_ssr

pull/1864/head
Rich Harris 7 years ago
parent d9854c5dd6
commit 49a747f376

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
html: '<button>10</button>', html: '<button>10</button>',

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
value: 'hello!' value: 'hello!'

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
value: 'hello!' value: 'hello!'

@ -1,7 +1,7 @@
export default { export default {
// This is a bit of a funny one — there's no equivalent attribute, // This is a bit of a funny one — there's no equivalent attribute,
// so it can't be server-rendered // so it can't be server-rendered
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
indeterminate: true indeterminate: true

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
inputType: 'text', inputType: 'text',

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
foo: false, foo: false,

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
html: ` html: `
<span>3</span> <span>3</span>

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
value: 'hello!' value: 'hello!'

@ -6,7 +6,7 @@ const tasks = [
]; ];
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
tasks, tasks,

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
indeterminate: true, indeterminate: true,

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, // TODO would be nice to fix this in SSR as well skip_if_ssr: true, // TODO would be nice to fix this in SSR as well
html: ` html: `
<p>selected: a</p> <p>selected: a</p>

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
count: 3 count: 3

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
count: 3 count: 3

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, // TODO delete this line, once binding works skip_if_ssr: true, // TODO delete this line, once binding works
// This test fails, because the Bar y binding is activated before the // This test fails, because the Bar y binding is activated before the
// Baz x binding, meaning that by the time Foo is created, we already // Baz x binding, meaning that by the time Foo is created, we already

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, // TODO delete this line, once binding works skip_if_ssr: true, // TODO delete this line, once binding works
html: ` html: `
<p>y: bar</p> <p>y: bar</p>

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, // TODO delete this line, once binding works skip_if_ssr: true, // TODO delete this line, once binding works
props: { props: {
x: 'initial' x: 'initial'

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, // TODO delete this line, once binding works skip_if_ssr: true, // TODO delete this line, once binding works
html: ` html: `
<button>+1</button> <button>+1</button>

@ -3,7 +3,7 @@
export default { export default {
skip: true, // TODO skip: true, // TODO
'skip-ssr': true, skip_if_ssr: true,
html: ` html: `
<div><p>first thing (true)</p></div> <div><p>first thing (true)</p></div>

@ -1,7 +1,7 @@
import order from './order.js'; import order from './order.js';
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
test(assert, component, target) { test(assert, component, target) {
assert.deepEqual(order, [ assert.deepEqual(order, [

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
html: ` html: `
<div>foo</div> <div>foo</div>

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, // uses oncreate skip_if_ssr: true, // uses oncreate
html: `<div><p>true</p>\n<p>true</p></div>` html: `<div><p>true</p>\n<p>true</p></div>`
}; };

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, // uses oncreate skip_if_ssr: true, // uses oncreate
html: `<div><p>true</p></div>`, html: `<div><p>true</p></div>`,

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
html: `<p>from this.options</p>`, html: `<p>from this.options</p>`,
options: { options: {

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
raw: '<p>does not change</p>' raw: '<p>does not change</p>'

@ -1,7 +1,7 @@
const ns = '<noscript></noscript>'; const ns = '<noscript></noscript>';
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
raw: '<span><em>raw html!!!\\o/</span></em>' raw: '<span><em>raw html!!!\\o/</span></em>'

@ -1,7 +1,7 @@
const items = [ { id: 'a' }, { id: 'b' } ]; const items = [ { id: 'a' }, { id: 'b' } ];
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
foo: 'b', foo: 'b',

@ -1,7 +1,7 @@
const items = [ { id: 'a' }, { id: 'b' } ]; const items = [ { id: 'a' }, { id: 'b' } ];
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
items items

@ -1,7 +1,7 @@
const items = [ {}, {} ]; const items = [ {}, {} ];
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
foo: items[0], foo: items[0],

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
foo: 'a' foo: 'a'

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, // uses oncreate skip_if_ssr: true, // uses oncreate
html: '<p>2</p>' html: '<p>2</p>'
}; };

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, // uses oncreate skip_if_ssr: true, // uses oncreate
html: ` html: `
<p>1</p> <p>1</p>

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, skip_if_ssr: true,
props: { props: {
x: 0, x: 0,

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, // SSR behaviour is awkwardly different skip_if_ssr: true, // SSR behaviour is awkwardly different
props: { props: {
foo: 42 foo: 42

@ -1,5 +1,5 @@
export default { export default {
'skip-ssr': true, // SSR behaviour is awkwardly different skip_if_ssr: true, // SSR behaviour is awkwardly different
props: { props: {
foo: 42 foo: 42

@ -1,26 +1,26 @@
export default { export default {
props: { props: {
visible: true, visible: true,
things: [ 'a', 'b', 'c' ] things: ['a', 'b', 'c']
}, },
test ( assert, component, target, window, raf ) { test(assert, component, target, window, raf) {
assert.htmlEqual(target.innerHTML, ` assert.htmlEqual(target.innerHTML, `
<div>a</div> <div>a</div>
<div>b</div> <div>b</div>
<div>c</div> <div>c</div>
`); `);
component.things = [ 'a' ]; component.things = ['a'];
raf.tick( 100 ); raf.tick(100);
assert.htmlEqual(target.innerHTML, ` assert.htmlEqual(target.innerHTML, `
<div>a</div> <div>a</div>
`); `);
component.visible = false; component.visible = false;
raf.tick( 200 ); raf.tick(200);
assert.htmlEqual(target.innerHTML, ''); assert.htmlEqual(target.innerHTML, '');
} }
}; };

@ -3,7 +3,7 @@ export default {
skip: true, // some weird stuff happening with JSDOM 11 skip: true, // some weird stuff happening with JSDOM 11
// skip: /^v4/.test(process.version), // node 4 apparently does some dumb stuff // skip: /^v4/.test(process.version), // node 4 apparently does some dumb stuff
'skip-ssr': true, // there's some kind of weird bug with this test... it compiles with the wrong require.extensions hook for some bizarre reason skip_if_ssr: true, // there's some kind of weird bug with this test... it compiles with the wrong require.extensions hook for some bizarre reason
async test(assert, component, target, window) { async test(assert, component, target, window) {
const event = new window.Event('resize'); const event = new window.Event('resize');

@ -6,7 +6,7 @@ export default {
html: `true`, html: `true`,
skip: /^v4/.test(process.version), // node 4 apparently does some dumb stuff skip: /^v4/.test(process.version), // node 4 apparently does some dumb stuff
'skip-ssr': true, // there's some kind of weird bug with this test... it compiles with the wrong require.extensions hook for some bizarre reason skip_if_ssr: true, // there's some kind of weird bug with this test... it compiles with the wrong require.extensions hook for some bizarre reason
async test(assert, component, target, window) { async test(assert, component, target, window) {
const event = new window.Event('click'); const event = new window.Event('click');

@ -3,7 +3,7 @@ export default {
skip: true, // some weird stuff happening with JSDOM 11 skip: true, // some weird stuff happening with JSDOM 11
// skip: /^v4/.test(process.version), // node 4 apparently does some dumb stuff // skip: /^v4/.test(process.version), // node 4 apparently does some dumb stuff
'skip-ssr': true, // there's some kind of weird bug with this test... it compiles with the wrong require.extensions hook for some bizarre reason skip_if_ssr: true, // there's some kind of weird bug with this test... it compiles with the wrong require.extensions hook for some bizarre reason
async test(assert, component, target, window) { async test(assert, component, target, window) {
const event = new window.Event('resize'); const event = new window.Event('resize');

@ -100,7 +100,7 @@ describe("ssr", () => {
throw new Error("Forgot to remove `solo: true` from test"); throw new Error("Forgot to remove `solo: true` from test");
} }
if (config["skip-ssr"]) return; if (config.skip_if_ssr) return;
(config.skip ? it.skip : config.solo ? it.only : it)(dir, () => { (config.skip ? it.skip : config.solo ? it.only : it)(dir, () => {
const cwd = path.resolve("test/runtime/samples", dir); const cwd = path.resolve("test/runtime/samples", dir);

Loading…
Cancel
Save