-
Notifications
You must be signed in to change notification settings - Fork 2
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
[WIP] #5 #7
base: master
Are you sure you want to change the base?
[WIP] #5 #7
Changes from 1 commit
a659aa1
2027bc0
f33d5df
3e0d921
b7cd31b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Request from './request'; | ||
import {Container} from './'; | ||
// import descriptor from './descriptor'; | ||
|
||
const debug = require('debug')('restinga:resource'); | ||
|
||
|
@@ -25,7 +25,8 @@ export default class Resource { | |
this.collectionRoot = collectionRoot; | ||
this.itemRoot = itemRoot; | ||
|
||
this.descriptor = Container.get(this.service); | ||
const obj = {service: 'json-placeholder', prefix: 'http://jsonplaceholder.typicode.com', agent: 'restinga-node/1.0.0 (https://github.com/jay-ess/restinga-node)'}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Name it Don't make it a one-liner as it's too big. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
this.descriptor = obj || null; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're not receiving a descriptor from the user, you're mocking one! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i know, for while. |
||
|
||
this.attributes = {}; | ||
|
||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import test from 'ava'; | ||
import {Container} from '../src'; | ||
// import {Container} from '../src'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment, again. |
||
import {JsonPlaceholderService, PostResource, CommentResource} from './fixtures'; | ||
|
||
const jsonPlaceholderService = new JsonPlaceholderService(); | ||
|
||
Container.register(jsonPlaceholderService); | ||
// Container.register(jsonPlaceholderService); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again. |
||
|
||
test('Resource', t => { | ||
const post = new PostResource(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No comment here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, i had already removed the comments on the last commit.