/ [START] describe global variables /
/* global describe, it */
/ [END] describe global variables /
/ [START] import vendors /
import { expect } from 'chai';
/ [END] import vendors /
/ [START] import common stuff /
import {
isVersionCompatible,
compareVersions
} from 'src/tests/helpers';
/ [END] import common stuff /
/ [START] import local stuff /
import {
getEntities,
} from './model';
/ [END] import local stuff /
/ [START] describe 1 level /
describe('(Type) mergeAttributes', () => {
/ [START] variables for describe 1 level /
const existing = {
description: 'description'
};
/ [END] variables for describe 1 level /
/ [START] optional logic to be performed before each test case /
beforeEach(() => {});
/ [END] optional logic to be performed before each test case /
/ [START] tests for describe 1 level /
it('should replace existing data with incoming data', () => {
/ [START] variables for test /
const incoming = {
description: 'no, this description',
isSelected: true
};
/ [END] variables for test /
const actual = mergeAttributes(existing, incoming).description;
const expected = 'no, this description';
expect(actual).to.equal(expected);
});
/ [END] tests for describe 1 level /
/ [START] describe 2 level /
describe('merging existing data with incomplete incoming data', () {
/ [START] variables for describe 2 level [END] /
/ [START] tests for describe 2 level /
/ ... /
/ [END] tests for describe 2 level /
});
/ [END] describe 2 level /
/ Other describe 2 level /
});
/ [END] describe 1 level / |