1
0
Fork 0
mirror of synced 2024-09-29 08:41:16 +13:00

Remove Comments

This commit is contained in:
Conor_Mack 2020-06-24 17:05:49 +01:00
parent b9d7cfdec1
commit 323256cabf

View file

@ -4,29 +4,7 @@ import {
getAncestorProps,
} from "../src/components/userInterface/pagesParsing/searchComponents"
import { componentsAndScreens } from "./testData"
/*
//searchAllComponents used in ComponentSearch which is no longer used in the Builder
describe("searchAllComponents", () => {
it.only("should match component by name", () => {
const results = searchAllComponents(
componentsAndScreens().components,
"Textbox"
)
expect(results.length).toBe(1)
expect(results[0].name).toBe("budibase-components/TextBox")
})
it("should match component by tag", () => {
const results = searchAllComponents(
componentsAndScreens().components,
"record"
)
expect(results.length).toBe(1)
expect(results[0].name).toBe("budibase-components/RecordView")
})
}) */
describe("getExactComponent", () => {
it("should get component by name", () => {
@ -57,29 +35,3 @@ describe("getExactComponent", () => {
})
})
// Commented as not used anywhere
//describe("getAncestorProps", () => {
// it("should return props of root component", () => {
// const result = getAncestorProps(
// componentsAndScreens().components,
// "budibase-components/TextBox"
// )
// expect(result).toEqual([componentsAndScreens().components[0].props])
// })
// it("should return props of inherited and current component, in order", () => {
// const { components, screens } = componentsAndScreens()
// const allComponentsAndScreens = [...components, ...screens]
// const result = getAncestorProps(
// allComponentsAndScreens,
// "common/PasswordBox"
// )
// expect(result).toEqual([
// allComponentsAndScreens[0].props,
// { ...allComponentsAndScreens[5].props },
// ])
// })
// })