tannhu/jsface — Issue #1: issue unit tests and mixin native classes
Author: luakri
Created: 2012-01-15 19:14:06+00:00
State: open

hello tahhnhu

first of all my congrats for such a helper in creating something like jsface, a very lightweight oop library,i have already played with your library creating classes, subclasses, extending and augmenting, and using the super call.

will use definitely your library organizing both my client side scripts as well node scripts. so far only played in the client side with your library, cant wait to do the same in node. a oop library to work in both client side and in node, that is great.

when digging more in the examples of the api, i came across this example

extend(Array.prototype, {
trim: function() {
return this.replace(/^\s+|\s+$/g, "");
}
});

" Hello World ".trim(); // "Hello World"

works in ff, chrome, safari, ie9, but does not work in ie8, ie7 and probably ie6 as well

also when debugging, tested the units test page, the page does not display correctly in ie8 and ie7,
in the file /test/tests/core.js

there are some extra commas in the end of the object declaration

line 632 and line 598, extra commas

after fixing this , the page of unit tests display correctly, but reports errors in some unit tests in ie7 and ie8

issues:

unit test 5 - each returned value over a string (1, 0, 1) - invalid each returned value over a string -

unit test 11 - Check type with jsface.isMap on iframe (1, 0, 1) - 1 - Died on test #1: Object doesn't support this action - { "message": "Object doesn't support this action", "description": "Object doesn't support this action", "number": -2146827843, "name": "TypeError" }

unit test 13 - Check type with jsface.isArray on iframe (1, 0, 1) - 1 - Died on test #1: Object doesn't support this action - { "message": "Object doesn't support this action", "description": "Object doesn't support this action", "number": -2146827843, "name": "TypeError" }

unit test 15 - Check type with jsface.isFunction on iframe (1, 0, 1) - 1 - Died on test #1: Object doesn't support this action - { "message": "Object doesn't support this action", "description": "Object doesn't support this action", "number": -2146827843, "name": "TypeError" }

once again congrats for your work developing this library, it looks very promissing.

cheers