Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$parse method not throws an exception for invalid exponent value #351

Open
ghost opened this issue Aug 20, 2016 · 0 comments
Open

$parse method not throws an exception for invalid exponent value #351

ghost opened this issue Aug 20, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 20, 2016

it('will not parse invalid scientific notation', function () {
    expect(function () {
        parse('42e');
    }).toThrow();
});

The test above fails wherares the angular $parser works properly with this and throws an exception. The сulprit is Lexer.prototype.isNumber method which returns true for booleans passed as an argument (in this case 'false').

@ghost ghost changed the title $parse operator fails with not valid exponent value $parse method not throws exception for ivvalid exponent value Aug 20, 2016
@ghost ghost changed the title $parse method not throws exception for ivvalid exponent value $parse method not throws an exception for invalid exponent value Aug 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants