mirror of
https://github.com/zhigang1992/react.git
synced 2026-02-07 09:09:30 +08:00
test(code): remove unused testcase
This commit is contained in:
@@ -4,7 +4,7 @@ exports[`Code should repspond to changed by width 1`] = `
|
||||
initialize {
|
||||
"0": Object {
|
||||
"attribs": Object {
|
||||
"class": " ",
|
||||
"class": "",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
@@ -48,13 +48,6 @@ initialize {
|
||||
.dark code {
|
||||
color: white;
|
||||
}
|
||||
|
||||
pre:before {
|
||||
content: '$ ';
|
||||
display: none;
|
||||
font-weight: 500;
|
||||
user-select: none;
|
||||
}
|
||||
",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
@@ -110,13 +103,6 @@ initialize {
|
||||
.dark code {
|
||||
color: white;
|
||||
}
|
||||
|
||||
pre:before {
|
||||
content: '$ ';
|
||||
display: none;
|
||||
font-weight: 500;
|
||||
user-select: none;
|
||||
}
|
||||
",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
@@ -170,13 +156,6 @@ initialize {
|
||||
.dark code {
|
||||
color: white;
|
||||
}
|
||||
|
||||
pre:before {
|
||||
content: '$ ';
|
||||
display: none;
|
||||
font-weight: 500;
|
||||
user-select: none;
|
||||
}
|
||||
",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
@@ -190,7 +169,7 @@ initialize {
|
||||
"parent": null,
|
||||
"prev": Object {
|
||||
"attribs": Object {
|
||||
"class": " ",
|
||||
"class": "",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
@@ -247,7 +226,7 @@ initialize {
|
||||
"children": Array [
|
||||
Object {
|
||||
"attribs": Object {
|
||||
"class": " ",
|
||||
"class": "",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
@@ -315,7 +294,7 @@ exports[`Code should support block mode 1`] = `
|
||||
initialize {
|
||||
"0": Object {
|
||||
"attribs": Object {
|
||||
"class": " ",
|
||||
"class": "",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
@@ -359,13 +338,6 @@ initialize {
|
||||
.dark code {
|
||||
color: white;
|
||||
}
|
||||
|
||||
pre:before {
|
||||
content: '$ ';
|
||||
display: none;
|
||||
font-weight: 500;
|
||||
user-select: none;
|
||||
}
|
||||
",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
@@ -421,13 +393,6 @@ initialize {
|
||||
.dark code {
|
||||
color: white;
|
||||
}
|
||||
|
||||
pre:before {
|
||||
content: '$ ';
|
||||
display: none;
|
||||
font-weight: 500;
|
||||
user-select: none;
|
||||
}
|
||||
",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
@@ -481,13 +446,6 @@ initialize {
|
||||
.dark code {
|
||||
color: white;
|
||||
}
|
||||
|
||||
pre:before {
|
||||
content: '$ ';
|
||||
display: none;
|
||||
font-weight: 500;
|
||||
user-select: none;
|
||||
}
|
||||
",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
@@ -501,7 +459,7 @@ initialize {
|
||||
"parent": null,
|
||||
"prev": Object {
|
||||
"attribs": Object {
|
||||
"class": " ",
|
||||
"class": "",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
@@ -558,7 +516,7 @@ initialize {
|
||||
"children": Array [
|
||||
Object {
|
||||
"attribs": Object {
|
||||
"class": " ",
|
||||
"class": "",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
|
||||
@@ -28,22 +28,4 @@ describe('Code', () => {
|
||||
wrapper.setProps({ block: true })
|
||||
expect(wrapper.find('pre').length).not.toBe(0)
|
||||
})
|
||||
|
||||
it('should alert warning when use bash', () => {
|
||||
let errorMessage = ''
|
||||
const errorSpy = jest.spyOn(console, 'error').mockImplementation(msg => (errorMessage = msg))
|
||||
|
||||
mount(<Code bash>code</Code>)
|
||||
expect(errorMessage.toLowerCase()).toContain('deprecated')
|
||||
errorSpy.mockRestore()
|
||||
})
|
||||
|
||||
it('should alert warning when use darkBash', () => {
|
||||
let errorMessage = ''
|
||||
const errorSpy = jest.spyOn(console, 'error').mockImplementation(msg => (errorMessage = msg))
|
||||
|
||||
mount(<Code darkBash>code</Code>)
|
||||
expect(errorMessage.toLowerCase()).toContain('deprecated')
|
||||
errorSpy.mockRestore()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user