fix: update eslint-disable comments to block style in Thrift tests
This commit is contained in:
parent
72fab1cac4
commit
6cc2d8e745
@ -336,11 +336,11 @@ TestRegister.addApiTests([
|
|||||||
// ===== buildBinaryStruct tests =====
|
// ===== buildBinaryStruct tests =====
|
||||||
it("Thrift: buildBinaryStruct - simple struct", () => {
|
it("Thrift: buildBinaryStruct - simple struct", () => {
|
||||||
const bytes = [];
|
const bytes = [];
|
||||||
// eslint-disable camelcase
|
/* eslint-disable camelcase */
|
||||||
const jsonStruct = {
|
const jsonStruct = {
|
||||||
field_1: { type: "I32", value: 42 }
|
field_1: { type: "I32", value: 42 }
|
||||||
};
|
};
|
||||||
// eslint-enable camelcase
|
/* eslint-enable camelcase */
|
||||||
buildBinaryStruct(jsonStruct, bytes);
|
buildBinaryStruct(jsonStruct, bytes);
|
||||||
const expected = [
|
const expected = [
|
||||||
8, 0, 1, // field type (I32), field id = 1
|
8, 0, 1, // field type (I32), field id = 1
|
||||||
@ -352,12 +352,12 @@ TestRegister.addApiTests([
|
|||||||
|
|
||||||
it("Thrift: buildBinaryStruct - multiple fields", () => {
|
it("Thrift: buildBinaryStruct - multiple fields", () => {
|
||||||
const bytes = [];
|
const bytes = [];
|
||||||
// eslint-disable camelcase
|
/* eslint-disable camelcase */
|
||||||
const jsonStruct = {
|
const jsonStruct = {
|
||||||
field_1: { type: "I32", value: 42 },
|
field_1: { type: "I32", value: 42 },
|
||||||
field_2: { type: "BINARY", value: "hello" }
|
field_2: { type: "BINARY", value: "hello" }
|
||||||
};
|
};
|
||||||
// eslint-enable camelcase
|
/* eslint-enable camelcase */
|
||||||
buildBinaryStruct(jsonStruct, bytes);
|
buildBinaryStruct(jsonStruct, bytes);
|
||||||
// Should end with T_STOP
|
// Should end with T_STOP
|
||||||
assert.strictEqual(bytes[bytes.length - 1], 0);
|
assert.strictEqual(bytes[bytes.length - 1], 0);
|
||||||
@ -365,11 +365,11 @@ TestRegister.addApiTests([
|
|||||||
|
|
||||||
it("Thrift: buildBinaryStruct - BOOL field", () => {
|
it("Thrift: buildBinaryStruct - BOOL field", () => {
|
||||||
const bytes = [];
|
const bytes = [];
|
||||||
// eslint-disable camelcase
|
/* eslint-disable camelcase */
|
||||||
const jsonStruct = {
|
const jsonStruct = {
|
||||||
field_1: { type: "BOOL", value: true }
|
field_1: { type: "BOOL", value: true }
|
||||||
};
|
};
|
||||||
// eslint-enable camelcase
|
/* eslint-enable camelcase */
|
||||||
buildBinaryStruct(jsonStruct, bytes);
|
buildBinaryStruct(jsonStruct, bytes);
|
||||||
const expected = [
|
const expected = [
|
||||||
2, 0, 1, // field type (BOOL), field id = 1
|
2, 0, 1, // field type (BOOL), field id = 1
|
||||||
@ -381,7 +381,7 @@ TestRegister.addApiTests([
|
|||||||
|
|
||||||
it("Thrift: buildBinaryStruct - nested struct", () => {
|
it("Thrift: buildBinaryStruct - nested struct", () => {
|
||||||
const bytes = [];
|
const bytes = [];
|
||||||
// eslint-disable camelcase
|
/* eslint-disable camelcase */
|
||||||
const jsonStruct = {
|
const jsonStruct = {
|
||||||
field_1: {
|
field_1: {
|
||||||
type: "STRUCT",
|
type: "STRUCT",
|
||||||
@ -390,7 +390,7 @@ TestRegister.addApiTests([
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// eslint-enable camelcase
|
/* eslint-enable camelcase */
|
||||||
buildBinaryStruct(jsonStruct, bytes);
|
buildBinaryStruct(jsonStruct, bytes);
|
||||||
// Should contain nested structure with T_STOP markers
|
// Should contain nested structure with T_STOP markers
|
||||||
assert.ok(bytes.length > 0);
|
assert.ok(bytes.length > 0);
|
||||||
@ -399,12 +399,12 @@ TestRegister.addApiTests([
|
|||||||
|
|
||||||
it("Thrift: buildBinaryStruct - invalid field ID skipped", () => {
|
it("Thrift: buildBinaryStruct - invalid field ID skipped", () => {
|
||||||
const bytes = [];
|
const bytes = [];
|
||||||
// eslint-disable camelcase
|
/* eslint-disable camelcase */
|
||||||
const jsonStruct = {
|
const jsonStruct = {
|
||||||
invalid_field: { type: "I32", value: 42 },
|
invalid_field: { type: "I32", value: 42 },
|
||||||
field_1: { type: "I32", value: 10 }
|
field_1: { type: "I32", value: 10 }
|
||||||
};
|
};
|
||||||
// eslint-enable camelcase
|
/* eslint-enable camelcase */
|
||||||
buildBinaryStruct(jsonStruct, bytes);
|
buildBinaryStruct(jsonStruct, bytes);
|
||||||
// Should skip invalid_field and only process field_1
|
// Should skip invalid_field and only process field_1
|
||||||
assert.strictEqual(bytes[0], 8); // field type
|
assert.strictEqual(bytes[0], 8); // field type
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user