revert: feat(ivy): improve debugging experience for styles/classes (#32753) (#32841)

This reverts commit 32f4544f34.

PR Close #32841
This commit is contained in:
Matias Niemelä
2019-09-24 14:50:13 -07:00
committed by Andrew Kushnir
parent 3a96631387
commit e668d7971d
5 changed files with 23 additions and 160 deletions

View File

@ -12,7 +12,7 @@ import {DEFAULT_GUARD_MASK_VALUE, allocTStylingContext} from '../../../src/rende
describe('styling context', () => {
it('should register a series of entries into the context', () => {
const debug = makeContextWithDebug(false);
const debug = makeContextWithDebug();
const context = debug.context;
expect(debug.entries).toEqual({});
@ -52,7 +52,7 @@ describe('styling context', () => {
});
it('should only register the same binding index once per property', () => {
const debug = makeContextWithDebug(false);
const debug = makeContextWithDebug();
const context = debug.context;
expect(debug.entries).toEqual({});
@ -70,7 +70,7 @@ describe('styling context', () => {
});
it('should overwrite a default value for an entry only if it is non-null', () => {
const debug = makeContextWithDebug(false);
const debug = makeContextWithDebug();
const context = debug.context;
registerBinding(context, 1, 0, 'width', null);
@ -109,9 +109,9 @@ describe('styling context', () => {
});
});
function makeContextWithDebug(isClassBased: boolean) {
function makeContextWithDebug() {
const ctx = allocTStylingContext();
return attachStylingDebugObject(ctx, isClassBased);
return attachStylingDebugObject(ctx);
}
function buildGuardMask(...bindingIndices: number[]) {

View File

@ -13,10 +13,10 @@ describe('styling debugging tools', () => {
describe('NodeStylingDebug', () => {
it('should list out each of the values in the context paired together with the provided data',
() => {
const debug = makeContextWithDebug(false);
const debug = makeContextWithDebug();
const context = debug.context;
const data: any[] = [];
const d = new NodeStylingDebug(context, data, false);
const d = new NodeStylingDebug(context, data);
registerBinding(context, 0, 0, 'width', null);
expect(d.summary).toEqual({
@ -63,7 +63,7 @@ describe('styling debugging tools', () => {
});
});
function makeContextWithDebug(isClassBased: boolean) {
function makeContextWithDebug() {
const ctx = allocTStylingContext();
return attachStylingDebugObject(ctx, isClassBased);
return attachStylingDebugObject(ctx);
}