This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/test/javascripts/components/text-field-test.js.es6

17 lines
464 B
JavaScript

moduleForComponent("text-field", {needs: []});
test("renders correctly with no properties set", function() {
var component = this.subject();
equal(component.get('type'), "text");
});
test("support a placeholder", function() {
sandbox.stub(I18n, "t").returnsArg(0);
var component = this.subject({
placeholderKey: "placeholder.i18n.key"
});
equal(component.get('type'), "text");
equal(component.get('placeholder'), "placeholder.i18n.key");
});