Skip to content

Commit

Permalink
test: 更新快照
Browse files Browse the repository at this point in the history
  • Loading branch information
lijinke666 committed Jan 3, 2025
1 parent 224cdc5 commit c1e87ff
Show file tree
Hide file tree
Showing 43 changed files with 1,399 additions and 1,386 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`export should export correct data with show seriesNumber 1`] = `
"序号 col0 col1 col2
1 col0-0 col1-0 col2-0
2 col0-1 col1-1 col2-1"
`;

exports[`export should export correct data without show seriesNumber 1`] = `
"col0 col1 col2
col0-0 col1-0 col2-0
col0-1 col1-1 col2-1"
`;
11 changes: 3 additions & 8 deletions packages/s2-core/__tests__/bugs/issue-2501-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,9 @@ describe('Table Sheet Row Offsets Tests', () => {
});

test('should get correctly row offset data', () => {
expect((s2.facet as TableFacet).rowOffsets).toMatchInlineSnapshot(`
Array [
0,
100,
250,
280,
]
`);
expect((s2.facet as TableFacet).rowOffsets).toStrictEqual([
0, 100, 250, 280,
]);
});

test('should get correctly data cell offset for heightByField', () => {
Expand Down
12 changes: 2 additions & 10 deletions packages/s2-core/__tests__/bugs/issue-446-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ describe('export', () => {
expect(data.split('\n').length).toEqual(3);
expect(data.split('\n')[0].split('\t').length).toEqual(4);
expect(data.split('\n')[0].split('\t')[0]).toEqual('序号');
expect(data).toMatchInlineSnapshot(`
"序号 col0 col1 col2
1 col0-0 col1-0 col2-0
2 col0-1 col1-1 col2-1"
`);
expect(data).toMatchSnapshot();
});

test('should export correct data without show seriesNumber', async () => {
Expand All @@ -56,10 +52,6 @@ describe('export', () => {
expect(data.split('\n').length).toEqual(3);
expect(data.split('\n')[0].split('\t').length).toEqual(3);
expect(data.split('\n')[0].split('\t')[0]).toEqual('col0');
expect(data).toMatchInlineSnapshot(`
"col0 col1 col2
col0-0 col1-0 col2-0
col0-1 col1-1 col2-1"
`);
expect(data).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Array [
"padding": 0,
"spreadsheet": Anything,
"value": "province",
"width": 99.33,
"width": 99,
"x": 0,
"y": 0,
},
Expand All @@ -42,8 +42,8 @@ Array [
"padding": 0,
"spreadsheet": Anything,
"value": "city",
"width": 99.33,
"x": 99.33,
"width": 99,
"x": 99,
"y": 0,
},
]
Expand Down Expand Up @@ -418,7 +418,7 @@ Array [
"padding": 0,
"spreadsheet": Anything,
"value": "province",
"width": 99.33,
"width": 99,
"x": 0,
"y": 0,
},
Expand All @@ -438,8 +438,8 @@ Array [
"padding": 0,
"spreadsheet": Anything,
"value": "city",
"width": 99.33,
"x": 99.33,
"width": 99,
"x": 99,
"y": 0,
},
]
Expand Down
Loading

0 comments on commit c1e87ff

Please sign in to comment.