working on forms.test.js
MODIFY
package-lock.json
package-lock.json
"node-releases": "^1.1.42"
}
},
+ "bs-logger": {
+ "version": "0.2.6",
+ "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz",
+ "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==",
+ "requires": {
+ "fast-json-stable-stringify": "2.x"
+ }
+ },
"bser": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz",
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz",
"integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==",
- "dev": true,
"requires": {
"minimist": "^1.2.0"
}
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
},
+ "lodash.memoize": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
+ "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4="
+ },
"lodash.sortby": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
"semver": "^5.6.0"
}
},
+ "make-error": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz",
+ "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g=="
+ },
"makeerror": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz",
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
- "dev": true
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"mixin-deep": {
"version": "1.3.2",
"version": "0.5.1",
"resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
- "dev": true,
"requires": {
"minimist": "0.0.8"
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
- "dev": true
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
}
}
},
"path-parse": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
- "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
- "dev": true
+ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
},
"path-type": {
"version": "4.0.0",
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.1.tgz",
"integrity": "sha512-fn5Wobh4cxbLzuHaE+nphztHy43/b++4M6SsGFC2gB8uYwf0C8LcarfCz1un7UTW8OFQg9iNjZ4xpcFVGebDPg==",
- "dev": true,
"requires": {
"path-parse": "^1.0.6"
}
"punycode": "^2.1.0"
}
},
+ "ts-jest": {
+ "version": "25.2.0",
+ "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-25.2.0.tgz",
+ "integrity": "sha512-VaRdb0da46eorLfuHEFf0G3d+jeREcV+Wb/SvW71S4y9Oe8SHWU+m1WY/3RaMknrBsnvmVH0/rRjT8dkgeffNQ==",
+ "requires": {
+ "bs-logger": "0.x",
+ "buffer-from": "1.x",
+ "fast-json-stable-stringify": "2.x",
+ "json5": "2.x",
+ "lodash.memoize": "4.x",
+ "make-error": "1.x",
+ "mkdirp": "0.x",
+ "resolve": "1.x",
+ "semver": "^5.5",
+ "yargs-parser": "10.x"
+ },
+ "dependencies": {
+ "camelcase": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0="
+ },
+ "yargs-parser": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
+ "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
+ "requires": {
+ "camelcase": "^4.1.0"
+ }
+ }
+ }
+ },
"tslib": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",

MODIFY
package.json
package.json
"rdflib": "^1.0.6",
"solid-auth-client": "^2.3.1",
"solid-auth-tls": "^0.1.2",
- "solid-namespace": "^0.3.0"
+ "solid-namespace": "^0.3.0",
+ "ts-jest": "^25.2.0"
},
"devDependencies": {
"@babel/cli": "^7.6.2",

MODIFY
test/unit/widgets/forms.test.ts
test/unit/widgets/forms.test.ts
@@ -19,7 +19,7 @@ import {
promptForNew,
propertiesForClass,
sortByLabel,
- sortBySequence,
+ sortBySequence
} from '../../../src/widgets/forms'
import * as ns from '../../../src/ns'
@@ -125,7 +125,6 @@ describe('EmailField params', () => {
})
})
-
describe('PhoneField', () => {
it('exists', () => {
expect(field[ns.ui('PhoneField').uri]).toBeInstanceOf(Object)
@@ -352,17 +351,31 @@ describe('fieldLabel', () => {
it('exists', () => {
expect(fieldLabel).toBeInstanceOf(Object)
})
+ it(' ...', () => {
+ expect(fieldLabel('dom', undefined, 'form').toBe())
+ })
})
describe('fieldStore', () => {
it('exists', () => {
expect(fieldStore).toBeInstanceOf(Object)
})
+ it('returns def when there is no matching statement', () => {
+ const statementMatching = jest.fn()
+ statementMatching.mockReturnValueOnce(null)
+ expect(fieldStore('subject', 'predicate', 'def')).toBe('def')
+ })
})
describe('newThing', () => {
+ console.log(window)
it('exists', () => {
expect(newThing).toBeInstanceOf(Object)
})
+ /* need to also mock or figure out doc - which is a NamedNode
+ it('returns the correct .', () => {
+ const Date = jest.fn()
+ Date.mockReturnValueOnce('Thu Feb 06 2020 19:42:59 GMT+1100')
+ expect(newThing('doc').toBe(''))
+ }) */
})
-

working on forms.test.js