It depends on how long your working visa takes. If you come to Canada to work and you are pregnant in your last month, immigration may have 2nd thoughts about letting you in as you will not be able to perform your work and will soon be having a baby and taking maternity leave. Another problem is that if you are going to a province where you have a 3 month wait for health care, you will have to pay your own health care expenses in the meantime. If the delivery happens before you get coverage, you will have to pay for that too.
However, if you get to Canada soon enough, you have to work for 600 hours (about 4 months full time) before you will earn the right to get maternity benefits and you would be covered by health care before the baby is born.