Skip to content

Conversation

@enpopo2101
Copy link
Contributor

No description provided.

@enpopo2101 enpopo2101 self-assigned this Dec 25, 2019
Copy link

@duynguyenod duynguyenod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge vào integration, không phải master, chưa rebase

@enpopo2101 enpopo2101 changed the base branch from master to integration December 25, 2019 07:57
@enpopo2101 enpopo2101 force-pushed the feature/ODE-57-Create-Info-service branch from d47bd11 to f4e8206 Compare December 25, 2019 07:59
Copy link

@duynguyenod duynguyenod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toàn bộ test em viết đang là integration test, vì nó có can thiệp đến model.
Unit test em phải mock cái model nha. Add thêm nhá, mấy cái exist thì vẫn là unit test.
Những task khác, nếu có integration test thì tốt nhưng không bắt buôcj, có thể thêm sau, nhưng unit test là phải có nha e.

@duynguyenod
Copy link

Em có thể coi những file khác trong unit test để tham khảo nha

@duynguyenod duynguyenod added the enhancement New feature or request label Dec 26, 2019
import { assignIn } from 'lodash';
import InfoModel from '../models/info.model';

exports.create = async (any) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nếu như input data là any thì e đã test vs trường hợp {
key: 'ahihi',
balabbaxam: ''
}
Như này thì nó vẫn có lỗi ko?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cái này sẽ không có lỗi ạ, chỉ ko lưu cái kia vào thôi a

Copy link

@duynguyenod duynguyenod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Em viết UnitTest nhưng đây là Integration test rồi, unit test thì em sẽ phải mock toàn bộ các function liên quan tới mongoose, để test service logic. Và có 1 lỗi coverage kìa.

@duynguyenod duynguyenod force-pushed the feature/ODE-57-Create-Info-service branch from d53e514 to d3ecf0c Compare January 5, 2020 04:52
@enpopo2101 enpopo2101 force-pushed the feature/ODE-57-Create-Info-service branch from d3ecf0c to 5a8b6fc Compare January 18, 2020 08:02
change folder

fix path import

add test

add more test

edit some problems

edit test

edit test

update test
@duynguyenod duynguyenod force-pushed the feature/ODE-57-Create-Info-service branch from 5a8b6fc to d036954 Compare January 18, 2020 12:15
@duynguyenod duynguyenod merged commit d00edc3 into integration Jan 18, 2020
@duynguyenod duynguyenod deleted the feature/ODE-57-Create-Info-service branch January 18, 2020 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants