Comments (2)
Hm yeah, that is for the way its designed at the moment.
In the documentation (here http://chris-l.github.io/mock-couch/#views ) I mention that the functions should be passed as functions, that is, not as strings. But this is by using mockcouch functions to add documents.
If you add a design document using nano, nano will convert your function into a string before to actually sending it to mockcouch. (it make sense, there is no other way to pass a function over JSON than stringifying it)
That is, at this moment, the mockcouch is not prepared to receive design documents by any other means than using directly the mockcouch methods, ie addDoc
or addDB
.
I haven't touched the source code in a while, so I'm not sure if is possible to do it, but I'll check it out.
from mock-couch.
I've added support for this; creating a PR for ya.
from mock-couch.
Related Issues (20)
- Allow '/' in database names
- Fix PUT db
- New databases created via HTTP don't get a changes list
- Fix exception with views emitting null values and including docs
- Leaving out optional rows array doesn't create a db with addDB.
- When querying against multiple keys, rows.length will be at most equal to keys.length HOT 1
- Add support for built-in reduce functions HOT 3
- Support for design document update handlers? HOT 4
- support for _show and _list functions HOT 2
- Getting some errors with node v5.9.0 HOT 3
- Fix in 'Add put/post for design docs #42' Wasn't Delivered into NPM Package HOT 2
- View collation bug with array keys HOT 2
- CouchDB 2.0
- The super constructor to "inherits" must not be null or undefined HOT 8
- Doesn't seem to work with yarn HOT 2
- I get this error when running my simple tests: The super constructor to inherits must not be null or undefined HOT 6
- crash on require('mock-couch') HOT 4
- No need for npm-shrinkwrap.json to be included in repo HOT 1
- TypeError [ERR_INVALID_ARG_TYPE]: The "superCtor" argument must be of type Function. Received type undefined HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mock-couch.