run(srcInput) { const input = srcInput; input.text = this.normalize(input.text, input); return input; }
describe('Init', () => { test('Should init text', () => { const lexer = new Lexer(); lexer.init('This is a text'); expect(lexer.text).toEqual('This is a text'); }); });
async run(srcInput) { const input = srcInput; const locale = input.locale || 'en'; const stemmer = this.container.get(`stemmer-${locale}`) || this; input.tokens = await stemmer.stem( input.text || input.tokens.join(' '), input ); return input; }
const Snippet = ( { note, snippet, url } ) => ( <a href={ url } { ...linkProps( note ) } target="_blank" rel="noopener noreferrer"> <span className="wpnc__excerpt">{ snippet.text }</span> </a> )
// Component const Loading = (props) => ( <View style={styles.container}> <ActivityIndicator size={props.size} color={secondary} /> <Text style={styles.text}>{ props.message }</Text> </View> )
async terminalData(stream, data) { const content = await(await fetch(`data:application/octet-stream;base64,${data}`)).text(); if (content.startsWith('Debugger listening on') || content.startsWith('Debugger attached.') || content.startsWith('Waiting for the debugger to disconnect...')) return; await Ndb.backend.writeTerminalData(stream, data); this.dispatchEventToListeners(Ndb.NodeProcessManager.Events.TerminalData, content); }
render () { const options = { attributes: { rel: 'nofollow' }, className: classes.link } return ( <Linkify tagName='span' options={options}>{this.props.text}</Linkify> ) }
render () { return ( <div className={classes.block}> <ReactRouterLink to={this.props.link} className={classes.link}> <i className={classnames('material-icons', classes.link_icon)}>chevron_right</i> {this.props.text} </ReactRouterLink> </div> ) }
this.state.logs.forEach(function(log) { if (!log.hide) { logs.push({ id: log.id, text: log.text, level: log.level, date: log.date }); } });
describe('HelloWorld.vue', () => { it('renders props.msg when passed', () => { const msg = 'new message' const wrapper = shallowMount(HelloWorld, { propsData: { msg } }) expect(wrapper.text()).to.include(msg) }) })
run(srcInput) { const input = srcInput; input.text = this.normalize(input.text, input); return input; }
run(srcInput) { const input = srcInput; input.text = this.normalize(input.text, input); return input; }
run(srcInput) { const input = srcInput; input.text = this.normalize(input.text, input); return input; }