This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class CreatePostCommand extends Command { | |
/** | |
* Creates a command for adding new post to the system, | |
* @param {Posts} posts - posts in system | |
*/ | |
constructor(posts) { | |
super(); | |
this.posts = posts; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NotYetImplementedError } from './NotYetImplementedError'; | |
/** | |
* Interface for classes that implement Command Pattern | |
* | |
* @interface | |
*/ | |
export class Command { | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class NotYetImplementedError extends Error { | |
get name () { | |
return this.constructor.name; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('NumberSumCalculatoin', () => { | |
it('passed sum calculaton', () => { | |
expect(new NumberSumCalculation(2, 2).calculate()).toEqual(4); | |
}) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @todo: #1132:15m/DEV Implement Number Sum Calculation | |
* | |
*/ | |
export class NumberSumCalculation implements Calucation<number> { | |
/** | |
* Create a number sum calculation. | |
* @param {number} left - The left value. | |
* @param {number} right - The right value. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Represents a generic calculation. | |
* Allow to go beyound standard language types and operators | |
*/ | |
export interface Calculation<R> { | |
/** | |
* Execute calculation within entities usually provided in constructor | |
* @return {R} result - calculation result | |
*/ | |
calculate(): R; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>My first Vue app</title> | |
<script src="https://unpkg.com/vue"></script> | |
</head> | |
<body> | |
<div id="app"> | |
{{ message }} | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from 'fs'; | |
import path, { resolve } from 'path'; | |
import assert from 'assert'; | |
import Module from 'module'; | |
import jsdom from 'jsdom'; | |
import Mocha from 'mocha'; | |
import chokidar from 'chokidar'; | |
// Let's import and globalize testing tools so | |
// there's no need to require them in each test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="jr-mJoinsDesigner"> | |
<div class="jr-mJoinsDesigner-header"> | |
<div class="jr-mJoinsDesigner-header-leftTable">Left:Table Fields</div> | |
<div class="jr-mJoinsDesigner-header-operator">Operator</div> | |
<div class="jr-mJoinsDesigner-header-rightTable">Right:Table Fields</div> | |
<div class="jr-mJoinsDesigner-header-type">Type</div> | |
<div class="jr-mJoinsDesigner-header-weight">Weight</div> | |
<div class="jr-mJoinsDesigner-header-options">Options</div> | |
</div> | |
<div class="jr-mJoinsDesigner-dataIslands"> |
NewerOlder