kopia lustrzana https://github.com/wagtail/wagtail
JS linting fixes
rodzic
532a530836
commit
f115ff7f4d
|
|
@ -8,7 +8,7 @@ describe('Document', () => {
|
|||
it('works', () => {
|
||||
const content = convertFromRaw({
|
||||
entityMap: {
|
||||
'1': {
|
||||
1: {
|
||||
type: 'DOCUMENT',
|
||||
data: {
|
||||
url: '/example.pdf',
|
||||
|
|
@ -29,7 +29,7 @@ describe('Document', () => {
|
|||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
});
|
||||
expect(shallow((
|
||||
<Document
|
||||
contentState={content}
|
||||
|
|
@ -45,7 +45,7 @@ describe('Document', () => {
|
|||
it('no data', () => {
|
||||
const content = convertFromRaw({
|
||||
entityMap: {
|
||||
'2': {
|
||||
2: {
|
||||
type: 'DOCUMENT',
|
||||
}
|
||||
},
|
||||
|
|
@ -62,7 +62,7 @@ describe('Document', () => {
|
|||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
});
|
||||
expect(shallow((
|
||||
<Document
|
||||
contentState={content}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ describe('Link', () => {
|
|||
it('works', () => {
|
||||
const content = convertFromRaw({
|
||||
entityMap: {
|
||||
'1': {
|
||||
1: {
|
||||
type: 'LINK',
|
||||
data: {
|
||||
url: 'http://www.example.com/',
|
||||
|
|
@ -28,7 +28,7 @@ describe('Link', () => {
|
|||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
});
|
||||
expect(shallow((
|
||||
<Link
|
||||
contentState={content}
|
||||
|
|
@ -46,25 +46,25 @@ describe('Link', () => {
|
|||
expect(getLinkAttributes({ id: '1', url: '/' })).toMatchObject({
|
||||
url: '/',
|
||||
label: '/',
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
it('mail', () => {
|
||||
expect(getLinkAttributes({ url: 'mailto:test@ex.com' })).toMatchObject({
|
||||
url: 'mailto:test@ex.com',
|
||||
label: 'test@ex.com',
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
it('external', () => {
|
||||
expect(getLinkAttributes({ url: 'http://www.ex.com/' })).toMatchObject({
|
||||
url: 'http://www.ex.com/',
|
||||
label: 'www.ex.com',
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
it('no data', () => {
|
||||
expect(getLinkAttributes({})).toMatchObject({ url: '' })
|
||||
expect(getLinkAttributes({})).toMatchObject({ url: '' });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -53,14 +53,18 @@ module.exports = function exports() {
|
|||
exclude: /node_modules/,
|
||||
},
|
||||
].concat(Object.keys(exposedDependencies).map((name) => {
|
||||
const globalName = exposedDependencies[name];
|
||||
|
||||
// Create expose-loader configs for each Wagtail dependency.
|
||||
return {
|
||||
test: require.resolve(name),
|
||||
use: [{
|
||||
use: [
|
||||
{
|
||||
loader: 'expose-loader',
|
||||
options: exposedDependencies[name]
|
||||
}]
|
||||
}
|
||||
options: globalName,
|
||||
},
|
||||
],
|
||||
};
|
||||
}))
|
||||
},
|
||||
stats: {
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue