intl-tel-input
Version:
A JavaScript plugin for entering and validating international telephone numbers
27 lines (19 loc) • 563 B
JavaScript
describe("setCountry: init plugin and calling public method setCountry()", function() {
var countryCode = "gb";
beforeEach(function() {
intlSetup();
input = $("<input>").wrap("div");
iti = window.intlTelInput(input[0]);
iti.setCountry(countryCode);
});
afterEach(function() {
intlTeardown();
});
it("updates the selected flag", function() {
expect(getSelectedFlagElement()).toHaveClass(countryCode);
});
it("does not insert the dial code", function() {
expect(getInputVal()).toEqual("");
});
});
;