Skip to content

Instantly share code, notes, and snippets.

Avatar

Dawid Sibiński dsibinski

View GitHub Profile
View jsonnet_json_with_cirtular_refs.json
[
{
"$id": "1",
"Name": "John",
"BestFriend": null
},
{
"$id": "2",
"Name": "Alicia",
"BestFriend": {
View jsonnet_circuar_refs_example.cs
class Person
{
public string Name { get; set; }
public Person BestFriend { get; set; }
}
[HttpGet]
public ActionResult TestPeopleData()
{
var john = new Person { Name = "John" };
View stryker.conf.json
{
"$schema": "./node_modules/@stryker-mutator/core/schema/stryker-schema.json",
"packageManager": "npm",
"reporters": [
"html",
"clear-text",
"progress"
],
"checkers": ["typescript"],
"tsconfigFile": "tsconfig.json",
View jest.config.js
module.exports = {
verbose: true,
preset: 'ts-jest',
testEnvironment: 'jsdom',
reporters: ["default"],
coverageReporters: ["text", "text-summary"],
collectCoverage: true
};
View jest.config_teamcity.js
module.exports = {
verbose: true,
preset: 'ts-jest',
testEnvironment: 'jsdom',
reporters: ["default", "jest-teamcity"]
};
View jest.config_init.js
module.exports = {
verbose: true,
preset: 'ts-jest',
testEnvironment: 'jsdom',
reporters: ["default"]
};
View jest_tests.ts
describe('FormIoJsonProcessor', () => {
describe('test getComponentsCount', () => {
it('should return correct components count for a form with 6 not nested components', () => {
let formIoJsonProcessor = new FormIoJsonProcessor();
expect(formIoJsonProcessor
.getRandomizableComponentsCount(formWith6NotNestedComponents))
.toBe(6);
})
it('should treat FieldSet and Columns as a single component when counting components', () => {
View services.ts
module.exports.StockService = function (rootUrl: string) {
this.rootUrl = rootUrl + "/Stock/";
};
module.exports.StockService.prototype.getStockInfo = function (articleId: Guid) {
let url = this.rootUrl + "Info";
return get(url, {
articleId: articleId
});
View services.js
module.exports.StockService = function (rootUrl) {
this.rootUrl = rootUrl + "/Stock/";
};
module.exports.StockService.prototype.getStockInfo = function (articleId) {
let url = this.rootUrl + "Info";
return get(url, {
articleId: articleId
});