Skip to content

Commit

Permalink
test: 单测修复
Browse files Browse the repository at this point in the history
  • Loading branch information
wjgogogo committed Nov 29, 2023
1 parent 7871a49 commit f560e2d
Showing 1 changed file with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { getContainer } from 'tests/util/helpers';
import { EMPTY_FIELD_VALUE, type S2DataConfig, type S2Options } from '@/common';
import {
EMPTY_FIELD_VALUE,
ORIGIN_FIELD,
type S2DataConfig,
type S2Options,
} from '@/common';
import { PivotSheet, SpreadSheet } from '@/sheet-type';

const s2Options: S2Options = {
Expand Down Expand Up @@ -217,17 +222,11 @@ describe('Miss Dimension Values Tests', () => {
emptyDimensionValueNode.parent.query,
);
expect(emptyDimensionDataCell.getMeta().fieldValue).toEqual(1732771);
expect(data).toMatchInlineSnapshot(`
Array [
Array [
Object {
"$$extra$$": "c5ce4e54-795a-42b3-9cc8-e8b685da44ee",
"$$value$$": 1732771,
"2d7feabd-76a2-4c11-8f24-79764af936b4": "总计",
"c5ce4e54-795a-42b3-9cc8-e8b685da44ee": 1732771,
},
],
]
expect(data[0][ORIGIN_FIELD]).toMatchInlineSnapshot(`
Object {
"2d7feabd-76a2-4c11-8f24-79764af936b4": "总计",
"c5ce4e54-795a-42b3-9cc8-e8b685da44ee": 1732771,
}
`);
expect(dimensionValues).toMatchInlineSnapshot(`
Array [
Expand Down

0 comments on commit f560e2d

Please sign in to comment.