Commit 7774bff0 authored by Nicolas Biri's avatar Nicolas Biri

Fix camel cases setter name

parent e1fb5dcf
Pipeline #844 passed with stage
in 1 minute and 20 seconds
{
"name": "jsmf-core",
"version": "0.9.1",
"version": "0.9.2",
"description": "Javascript Modelling Framework",
"main": "src/index.js",
"directories": {
......
......@@ -366,7 +366,7 @@ function removeName(n) {
}
function prefixedName(pre, n) {
return pre + _.capitalize(n)
return pre + _.upperFirst(n)
}
const onError =
......
......@@ -259,6 +259,15 @@ describe('Class instance', function() {
done()
})
it ('creates correct setter names for camel case fields', function(done) {
const s = new State()
const T = new JSMF.Class('T')
T.addReference('testCamel', State, JSMF.Cardinality.any, undefined, undefined, State)
const t1 = new T()
should(t1.addTestCamel).not.be.undefined()
done()
})
})
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment