angular-docs-cn/aio/tools/transforms/cli-docs-package/rendering/cliNegate.spec.js

17 lines
519 B
JavaScript

var factory = require('./cliNegate');
describe('cliNegate filter', function() {
var filter;
beforeEach(function() { filter = factory(); });
it('should be called "cliNegate"', function() { expect(filter.name).toEqual('cliNegate'); });
it('should make the first char uppercase and add `no` to the front', function() {
expect(filter.process('abc')).toEqual('noAbc');
});
it('should make leave the rest of the chars alone', function() {
expect(filter.process('abCdE')).toEqual('noAbCdE');
});
});